From cb3a828acae3f93ce54715a3ec05d0d868357008 Mon Sep 17 00:00:00 2001 From: Jerad C Date: Thu, 23 Sep 2021 16:04:36 -0500 Subject: [PATCH] condense code --- pkg/controllers/metrics/node/counter/counter.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/controllers/metrics/node/counter/counter.go b/pkg/controllers/metrics/node/counter/counter.go index d0779ae2a03c..b733843179ca 100644 --- a/pkg/controllers/metrics/node/counter/counter.go +++ b/pkg/controllers/metrics/node/counter/counter.go @@ -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)) } }