Skip to content

Commit 0a9c9fa

Browse files
authored
Merge pull request #3325 from oif/fix/add-space-trimming-for-label-allow-list
2 parents ff9b5b6 + 99502b0 commit 0a9c9fa

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cmd/cadvisor.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,10 @@ func main() {
156156
containerLabelFunc := metrics.DefaultContainerLabels
157157
if !*storeContainerLabels {
158158
whitelistedLabels := strings.Split(*whitelistedContainerLabels, ",")
159+
// Trim spacing in labels
160+
for i := range whitelistedLabels {
161+
whitelistedLabels[i] = strings.TrimSpace(whitelistedLabels[i])
162+
}
159163
containerLabelFunc = metrics.BaseContainerLabels(whitelistedLabels)
160164
}
161165

0 commit comments

Comments
 (0)