Skip to content

Commit 43b7491

Browse files
committed
🐛 do not error when webhook matchpolicy unset
This handles the case where the matchpolicy is not set using a webhook marker.
1 parent 92e95c1 commit 43b7491

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)