Include Pod UID in the discovery metadata.

This commit is contained in:
Tom Wilkie 2017-11-07 16:24:23 +00:00
parent 303efee1a9
commit 06dc1e8797
1 changed files with 2 additions and 0 deletions

View File

@ -140,6 +140,7 @@ const (
podAnnotationPrefix = metaLabelPrefix + "pod_annotation_"
podNodeNameLabel = metaLabelPrefix + "pod_node_name"
podHostIPLabel = metaLabelPrefix + "pod_host_ip"
podUID = metaLabelPrefix + "pod_uid"
)
func podLabels(pod *apiv1.Pod) model.LabelSet {
@ -149,6 +150,7 @@ func podLabels(pod *apiv1.Pod) model.LabelSet {
podReadyLabel: podReady(pod),
podNodeNameLabel: lv(pod.Spec.NodeName),
podHostIPLabel: lv(pod.Status.HostIP),
podUID: lv(string(pod.ObjectMeta.UID)),
}
for k, v := range pod.Labels {