MODULE

PYTEST_HELM_CHARTS.K8S.DEPLOYMENT

Functions
  • wait_for_deployments_to_run(kube_client, deployment_names, deployments_namespace, timeout_sec, missing_ok) (list of Deployment) Block until all the Deployments are running or timeout is reached.</>
function

pytest_helm_charts.k8s.deployment.wait_for_deployments_to_run(kube_client, deployment_names, deployments_namespace, timeout_sec, missing_ok=True)

Block until all the Deployments are running or timeout is reached.

Parameters
  • kube_client (HTTPClient) client to use to connect to the k8s cluster
  • deployment_names (list of str) a list of Deployment names to check
  • deployments_namespace (str) namespace where all the Deployments are created (single namespace for all resources)
  • timeout_sec (int) timeout for the call
  • missing_ok (bool, optional) when True, the function ignores that some of the objects listed in the deployment_names don't exist in k8s API and waits for them to show up; when False, a pykube.exceptions.ObjectDoesNotExist exception is raised.
Returns (list of Deployment)

The list of Deployment resources with all the objects listed in deployment_names included.

Raises
  • TimeoutError when timeout is reached.
  • pykube.exceptions.ObjectDoesNotExist when missing_ok == False and one of the objects listed in deployment_names can't be found in k8s API