Skip to content

Commit f448e00

Browse files
committed
revert: rollback prom metrics container_env changes.
Signed-off-by: colstuwjx <[email protected]>
1 parent aa0afbe commit f448e00

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

metrics/prometheus.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1836,7 +1836,7 @@ func DefaultContainerLabels(container *info.ContainerInfo) map[string]string {
18361836
}
18371837

18381838
// BaseContainerLabels returns a ContainerLabelsFunc that exports the container
1839-
// name, first alias, image name as well as all its env and white listed label values.
1839+
// name, first alias, image name as well as white listed label values.
18401840
func BaseContainerLabels(whiteList []string) func(container *info.ContainerInfo) map[string]string {
18411841
whiteListMap := make(map[string]struct{}, len(whiteList))
18421842
for _, k := range whiteList {
@@ -1856,9 +1856,6 @@ func BaseContainerLabels(whiteList []string) func(container *info.ContainerInfo)
18561856
set[ContainerLabelPrefix+k] = v
18571857
}
18581858
}
1859-
for k, v := range container.Spec.Envs {
1860-
set[ContainerEnvPrefix+k] = v
1861-
}
18621859
return set
18631860
}
18641861
}

0 commit comments

Comments
 (0)