From 75386c82c8da31b95f458e1e4b17ddb0e9cfe5f4 Mon Sep 17 00:00:00 2001 From: yongruilin Date: Wed, 9 Oct 2024 15:55:53 -0700 Subject: [PATCH] fix: Clarify allowed format for metric label overrides Clarify on the allowed format flag "--allow-metric-labels" --- staging/src/k8s.io/component-base/metrics/options.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/staging/src/k8s.io/component-base/metrics/options.go b/staging/src/k8s.io/component-base/metrics/options.go index 2c72cb48fd6..17f44ef2a3f 100644 --- a/staging/src/k8s.io/component-base/metrics/options.go +++ b/staging/src/k8s.io/component-base/metrics/options.go @@ -129,7 +129,7 @@ func validateAllowMetricLabel(allowListMapping map[string]string) error { for k := range allowListMapping { reg := regexp.MustCompile(metricNameRegex + `,` + labelRegex) if reg.FindString(k) != k { - return fmt.Errorf("--allow-metric-labels must have a list of kv pair with format `metricName:labelName=labelValue, labelValue,...`") + return fmt.Errorf("--allow-metric-labels must have a list of kv pair with format `metricName,labelName=labelValue, labelValue,...`") } } return nil