mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
lib/promscrape/discovery/kubernetes: go fmt
This commit is contained in:
parent
92bc1afcee
commit
b4efe626d7
2 changed files with 5 additions and 5 deletions
|
@ -22,13 +22,13 @@ type ObjectMeta struct {
|
|||
func (om *ObjectMeta) registerLabelsAndAnnotations(prefix string, m map[string]string) {
|
||||
for _, lb := range om.Labels {
|
||||
ln := discoveryutils.SanitizeLabelName(lb.Name)
|
||||
m[prefix + "_label_" + ln] = lb.Value
|
||||
m[prefix + "_labelpresent_" + ln] = "true"
|
||||
m[prefix+"_label_"+ln] = lb.Value
|
||||
m[prefix+"_labelpresent_"+ln] = "true"
|
||||
}
|
||||
for _, a := range om.Annotations {
|
||||
an := discoveryutils.SanitizeLabelName(a.Name)
|
||||
m[prefix + "_annotation_" + an] = a.Value
|
||||
m[prefix + "_annotationpresent_" + an] = "true"
|
||||
m[prefix+"_annotation_"+an] = a.Value
|
||||
m[prefix+"_annotationpresent_"+an] = "true"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@ func (n *Node) appendTargetLabels(ms []map[string]string) []map[string]string {
|
|||
}
|
||||
addrTypesUsed[a.Type] = true
|
||||
ln := discoveryutils.SanitizeLabelName(a.Type)
|
||||
m["__meta_kubernetes_node_address_" + ln] = a.Address
|
||||
m["__meta_kubernetes_node_address_"+ln] = a.Address
|
||||
}
|
||||
ms = append(ms, m)
|
||||
return ms
|
||||
|
|
Loading…
Reference in a new issue