domino_admin_toolkit.checks.test_cni module

domino_admin_toolkit.checks.test_cni.check_calico_services()
domino_admin_toolkit.checks.test_cni.get_age(creation_timestamp)

Calculates the age of an object from its creation timestamp until the current time.

Args:

creation_timestamp (str): The creation timestamp of the object in ISO 8601 format.

Returns:

str: A formatted string representing the age in days, hours, minutes (e.g., “3d5h12m”).

domino_admin_toolkit.checks.test_cni.is_tigera_operator_managed()

Checks if Calico is managed by Tigera operator by listing the Tigera installations in the cluster using the custom objects client.

Returns:

bool: True if Calico is managed by Tigera operator, False otherwise.

domino_admin_toolkit.checks.test_cni.test_calico_info()
Description:

Tests the health status and version information of Calico components and Tigera operator (if managed by Tigera) by querying Kubernetes resources and displaying the results in tabulated format.

Result:

Test passes if all the Calico components are healthy and version information is retrieved. For Tigera managed Calico, it also checks the status of Tigera operator and its version.

domino_admin_toolkit.checks.test_cni.test_calico_pods_health()
Description:

Tests the health status of Calico and Tigera pods by querying Kubernetes pods and checking their status.

Result:

Test passes if all the pods are in a healthy state and contain no error logs.