Skip to content

Commit

Permalink
revert: rollback prom metrics container_env changes.
Browse files Browse the repository at this point in the history
Signed-off-by: colstuwjx <colstuwjx@gmail.com>
  • Loading branch information
Colstuwjx committed Aug 24, 2021
1 parent aa0afbe commit f448e00
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions metrics/prometheus.go
Original file line number Diff line number Diff line change
Expand Up @@ -1836,7 +1836,7 @@ func DefaultContainerLabels(container *info.ContainerInfo) map[string]string {
}

// BaseContainerLabels returns a ContainerLabelsFunc that exports the container
// name, first alias, image name as well as all its env and white listed label values.
// name, first alias, image name as well as white listed label values.
func BaseContainerLabels(whiteList []string) func(container *info.ContainerInfo) map[string]string {
whiteListMap := make(map[string]struct{}, len(whiteList))
for _, k := range whiteList {
Expand All @@ -1856,9 +1856,6 @@ func BaseContainerLabels(whiteList []string) func(container *info.ContainerInfo)
set[ContainerLabelPrefix+k] = v
}
}
for k, v := range container.Spec.Envs {
set[ContainerEnvPrefix+k] = v
}
return set
}
}
Expand Down

0 comments on commit f448e00

Please sign in to comment.