Skip to content

Commit

Permalink
🐛 do not error when webhook matchpolicy unset
Browse files Browse the repository at this point in the history
This handles the case where the matchpolicy is not set using a webhook
marker.
  • Loading branch information
djzager committed Mar 18, 2020
1 parent 92e95c1 commit 43b7491
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/webhook/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 43b7491

Please sign in to comment.