From 43b7491d9fc80d4aa2da834f1dabb6460b366cb3 Mon Sep 17 00:00:00 2001 From: David Zager Date: Wed, 18 Mar 2020 11:58:58 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20do=20not=20error=20when=20webhoo?= =?UTF-8?q?k=20matchpolicy=20unset?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This handles the case where the matchpolicy is not set using a webhook marker. --- pkg/webhook/parser.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/webhook/parser.go b/pkg/webhook/parser.go index ce0ec760d..b5d342048 100644 --- a/pkg/webhook/parser.go +++ b/pkg/webhook/parser.go @@ -194,6 +194,8 @@ func (c Config) matchPolicy() (*admissionreg.MatchPolicyType, error) { matchPolicy = admissionreg.Exact case strings.ToLower(string(admissionreg.Equivalent)): matchPolicy = admissionreg.Equivalent + case "": + return nil, nil default: return nil, fmt.Errorf("unknown value %q for matchPolicy", c.MatchPolicy) }