From bd536b689faf3fd38bc602577b44b37adba78fd9 Mon Sep 17 00:00:00 2001 From: Daniel Albuquerque Date: Wed, 14 Oct 2020 15:20:15 +0100 Subject: [PATCH] Fix filtering of labels --- pkg/canary/util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/canary/util.go b/pkg/canary/util.go index 77b6fdfa..75d789fe 100644 --- a/pkg/canary/util.go +++ b/pkg/canary/util.go @@ -80,7 +80,7 @@ func includeLabelsByPrefix(labels map[string]string, includeLabelPrefixes []stri filteredLabels := make(map[string]string) for key, value := range labels { for _, includeLabelPrefix := range includeLabelPrefixes { - if key == "*" || strings.HasPrefix(key, includeLabelPrefix) { + if includeLabelPrefix == "*" || strings.HasPrefix(key, includeLabelPrefix) { filteredLabels[key] = value break }