Skip to content

Commit 15412e2

Browse files
authored
Merge pull request #420 from djzager/webhookbug
🐛 do not error when webhook matchpolicy unset
2 parents ce1dc9e + 43b7491 commit 15412e2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pkg/webhook/parser.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,8 @@ func (c Config) matchPolicy() (*admissionreg.MatchPolicyType, error) {
194194
matchPolicy = admissionreg.Exact
195195
case strings.ToLower(string(admissionreg.Equivalent)):
196196
matchPolicy = admissionreg.Equivalent
197+
case "":
198+
return nil, nil
197199
default:
198200
return nil, fmt.Errorf("unknown value %q for matchPolicy", c.MatchPolicy)
199201
}

0 commit comments

Comments
 (0)