Skip to content

Commit

Permalink
Merge pull request #3325 from oif/fix/add-space-trimming-for-label-al…
Browse files Browse the repository at this point in the history
…low-list
  • Loading branch information
iwankgb authored Jun 26, 2023
2 parents ff9b5b6 + 99502b0 commit 0a9c9fa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/cadvisor.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@ func main() {
containerLabelFunc := metrics.DefaultContainerLabels
if !*storeContainerLabels {
whitelistedLabels := strings.Split(*whitelistedContainerLabels, ",")
// Trim spacing in labels
for i := range whitelistedLabels {
whitelistedLabels[i] = strings.TrimSpace(whitelistedLabels[i])
}
containerLabelFunc = metrics.BaseContainerLabels(whitelistedLabels)
}

Expand Down

0 comments on commit 0a9c9fa

Please sign in to comment.