Skip to content

Label container status event time #175

@simwr872

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?

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