MODULE

PYTEST_HELM_CHARTS.K8S.STATEFUL_SET

Functions
  • wait_for_stateful_sets_to_run(kube_client, stateful_set_names, stateful_sets_namespace, timeout_sec, missing_ok) (list of StatefulSet) Block until all the StatefulSets are running or timeout is reached.</>
function

pytest_helm_charts.k8s.stateful_set.wait_for_stateful_sets_to_run(kube_client, stateful_set_names, stateful_sets_namespace, timeout_sec, missing_ok=False)

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

Parameters
  • kube_client (HTTPClient) client to use to connect to the k8s cluster
  • stateful_set_names (list of str) a list of StatefulSet names to check
  • stateful_sets_namespace (str) namespace where all the StatefulSets 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 stateful_set_names don't exist in k8s API and waits for them to show up; when False, an ObjectNotFound exception is raised.
Returns (list of StatefulSet)

The list of StatefulSet resources with all the objects listed in stateful_set_names included.

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