BuildPodLogContext
Builds a PodLogContext object from a given Kubernetes Pod object. It extracts the namespace, pod name, primary container name, and details for all regular and init containers.
def BuildPodLogContext(
pod: *v1.Pod
) - > *core.PodLogContext
Builds a PodLogContext object from a given Kubernetes Pod object. This function is used to extract relevant logging information from a pod's status.
Parameters
| Name | Type | Description |
|---|---|---|
| pod | *v1.Pod | The Kubernetes Pod object from which to extract log context information. |
Returns
| Type | Description |
|---|---|
*core.PodLogContext | A pointer to a core.PodLogContext object containing the pod's namespace, name, primary container, and lists of all containers and init containers. |