Skip to main content

GetReportedAt

Retrieves the 'reportedAt' timestamp from a Kubernetes Pod object. It iterates through the pod's conditions to find the 'PodCompleted' reason with 'PodReady' type and 'ConditionFalse' status, returning the latest 'LastTransitionTime' found for such a condition.

def GetReportedAt(
pod: *v1.Pod
) - > metav1.Time

Retrieves the last reported time for a Kubernetes Pod, specifically looking for the 'PodCompleted' condition. This function is used to determine when a pod finished its execution.

Parameters

NameTypeDescription
pod*v1.PodThe Kubernetes Pod object from which to extract the reported time. This object contains the status conditions to be evaluated.

Returns

TypeDescription
metav1.TimeThe LastTransitionTime of the 'PodCompleted' condition if found, otherwise a zero-value metav1.Time.