- start/stop pods: Do not crash if related Deployment / Statefulset does not exist
- mark package as PEP 561-compliant for type hints
- correct class attributes typing
- kubernetes_helper: correct typing for
use_kubeconfig
- tests: e2e: apply expecteddeploymentscales CRD from wiremind helm chart repository
- kubernetes: support StorageV1Api
- tests: rename
check_not_using_wiremind_cluster
tocheck_using_test_cluster
- test: check_using_test_cluster: also check for whitelisted node names in case of remote test cluster
- kubernetes: support NetworkingV1Api
- utils:
run_command
log the command to run at debug instead of info level.
- ClientWithArguments, KubernetesHelper: make pretty parameter customizable
- setup.cfg correct mypy and flake8 config
- mypy errors
- stop_pods: neutralize the HPA as
HPAScaleToZero
may be in use (HPA may scale up the Deployment even if replicas=0), a more straightforward solution will be available in the future see here. Of coursestart_pods
repairs it. (encourage users to run this command to re-scale up).
- kubernetes: add support for RbacAuthorizationV1.
- stop_pods: harden logic.
- Add python 3.10 CI.
- stop_pods: ignore failed (like Evicted) Pods, print what still needs to be stopped and simplify internal logic.
- setup.py: require kubernetes>=18.
- Open-sourcing
- Requires python>=3.7
- allow to give kube context as parameter.
- Add the possibility to specify the kubernetes context and the config file path while loading the kubernetes config
using
wiremind_kubernetes.kube_config.load_kubernetes_config
- Remove unused expecteddeploymentscale.wiremind.fr support.
- KubernetesHelper: add priority_class_name to generate_job
- delete-job: propagate deletion to related pod(s). Avoid having orphaned Pods when Job is deleted.
- Remove a lot of helper methods, replace them by wrapped kubernetes clients where we dynamically add needed additional parameters like dry_run or pretty to each function.
- run_command: fix mypy error check where it considers that process.stdout can be None even if we explicitely request it.
- Ensure backward compatibility with wiremind.fr old EDS resources.
- Add support for priorities. Requires upgrade to Kubernetes CustomResourceDefinition ExpectedDeploymentScale.wiremind.io/v1 and changes how dict of deployments are represented internally.
- KubernetesDeploymentManager: create_job: support for labels.
- KubernetesDeploymentManager: Add get_job method.
- stop-pods: wait for pods to be stopped for real.
- NamespacedKubernetesHelper: rename
deployment_namespace
init argument and instance member tonamespace
- NamespacedKubernetesHelper: rename
is_statefulset_ready
tois_deployment_ready
withstatefulset=True
parameter - E2eTests: move
setUpE2E
towiremind_kubernetes.tests.e2e_tests.conftest
- run_command: replace return_output parameter to return_result that does NO longer raise in cse of error, but returns out, err and returncode.
- KubernetesDeploymentManager: release_name init argument is now mandatory.
- load_kubernetes_config: if os.environ["CLASSIC_K8S_CONFIG"]: always use kubeconfig.
- KubernetesDeploymentManager: add create_job method.
- KubernetesHelper: add should_load_kubernetes_config parameter to init.
- Remove _get_kube_config_loader_for_yaml_file_with_persistence monkey-patch, no longer needed with kubernetes-python 11.x.x.
- e2e tests: delegate to gitlab-ci-common >= 10.1.1 configuration of calico.
- e2e tests: fix get_k8s_username.
- KubernetesHelper moved to NamespacedKubernetesHelper, and KubernetesHelper is now a simpler helper, not namespaced.
- For safety reasons, even unit tests should run on isolated tests-platform executors
- Helper function for object deletion/listing with dry_run support.
- Helper function for setting up e2e cluster.
- Require Python 3
- Add wiremind_kubernetes.e2e_tests.helpers.check_not_using_wiremind_cluster helper function
- get ExpectedDeploymentScale from either old-style label selector (release=...) or new-style (app.kubernetes.io/instance=...)
- Kubernetes python client doesn't persist oidc tokens after refresh
- Do not silently retry/ignore when getting deployment/statefulset scale.
- Fix dry-run for read kube methods.
- Fix minimum version of kubernetes python lib.
- Add dry_run support
- Add statefulset helpers
- run_command: allow to give a callback to call for each new stdout line.
- remove hardcoded
load_oid_token
, upgrade to kubernetes 10.x.x.
- scale-down: sleep 1 second instead of 2.
run_command
: allow to return output.
- stop-pods: wait only 2 seconds before checking, change logger output levels.
- Move a few logs to debug.
- improve
run_command
to log live output.
- KubernetesDeploymentManager: use
release_name
for real.
- Improve
_run_command
helper, rename it torun_command
.
- Use logger everywhere.
- Add
kubernetes_exec
helper function.
- Loading kube configuration: autodetect if run from a pod.