Module wallaroo.k8
This module wraps some kubernetes functionality that is useful for querying and monitoring deployments. The functions are similar to the ones found in kubectl but are specific/specialized to Wallaroo deployments.
Functions
def extract_ns_info(ns) ‑> dict
def extract_pod_info(pod) ‑> dict
-
Pull out some key info to minimize visual clutter.
def extract_pod_resource_info(pod) ‑> dict
-
Extract summary resource info for a particular pod.
def extract_service_info(svc) ‑> dict
Classes
class K8 (incluster=True)
-
Create a Kubernetes client. Expects to be running inside of the cluster.
Methods
def get_namespaces(self) ‑> List[dict]
-
Get all namespaces.
def get_pod_resources(self, namespace: str, podname_fragment: str) ‑> List[dict]
-
Get summary resource info for all pods with names that contain the provided string. Useful for seeing resources for pods for a particular namespace/model.
def get_pods(self, namespace: str = 'wallaroo') ‑> List[dict]
-
Get summary info for all pods in a namespace/deployment/model
def get_pods_verbose(self, namespace: str = 'wallaroo') ‑> List[~T]
-
Get detailed info for all the pods for a namespace/deployment/model
def get_pods_w_approx_name(self, namespace: str, name_fragment: str) ‑> List[~T]
-
Get summary info for pods with names that contain the provided substring. Useful for finding the engine(s) in a new deployment.
def get_services(self, namespace: str = 'wallaroo') ‑> List[Dict[str, Any]]
-
Get the services in a namespace