Skip to content

Label container status event time #175

Description

@simwr872

This is a suggestion related to #15. It would be very nice to have the latest status event time be labeled/annotated on the pod. There is an event produced for this, but events being best-effort (may be dropped) and temporary, a label/annotation could provide this data more reliably (and from pod-state).

Perhaps by adding a label in the pod labeller's setLabel method with the value of status.EventTime:

func (pu *PodLabeller) setLabel(pod *corev1.Pod, status *v1.ContainerStatus) {
if pod.Labels == nil {
pod.Labels = map[string]string{}
}
pod.Labels[path.Join(StatusLabelKeyPrefix, status.Name)] = status.Phase.String()
}

What do you think?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions