Skip to content

Commit

Permalink
condense code
Browse files Browse the repository at this point in the history
  • Loading branch information
cjerad committed Sep 23, 2021
1 parent 7dee04b commit cb3a828
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/controllers/metrics/node/counter/counter.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,7 @@ func getLabels(node *v1.Node) prometheus.Labels {
labels[metricOsLabel] = node.Labels["kubernetes.io/os"]

for _, c := range node.Status.Conditions {
labelName, found := conditionTypeToMetricLabel[c.Type]
if found {
if labelName, found := conditionTypeToMetricLabel[c.Type]; found {
labels[labelName] = strings.ToLower(string(c.Status))
}
}
Expand Down

0 comments on commit cb3a828

Please sign in to comment.