@@ -243,12 +243,14 @@ authorizers:
243
243
# Required, with no default.
244
244
timeout : 3s
245
245
# The API version of the authorization.k8s.io SubjectAccessReview to
246
- # send to and expect from the # webhook.
246
+ # send to and expect from the webhook.
247
247
# Same as setting `--authorization-webhook-version` flag
248
248
# Required, with no default
249
+ # Valid values: v1beta1, v1
249
250
subjectAccessReviewVersion : v1
250
251
# Controls the authorization decision when a webhook request fails to
251
- # complete or returns a malformed response.
252
+ # complete or returns a malformed response or errors evaluating
253
+ # matchConditions.
252
254
# Valid values:
253
255
# - NoOpinion: continue to subsequent authorizers to see if one of
254
256
# them allows the request
@@ -265,8 +267,23 @@ authorizers:
265
267
# allowed for kube-apiserver.
266
268
type : KubeConfig
267
269
# Path to KubeConfigFile for connection info
270
+ # Required, if connectionInfo.Type is KubeConfig
268
271
kubeConfigFile : /kube-system-authz-webhook.yaml
272
+ # matchConditions is a list of conditions that must be met for a request to be sent to this
273
+ # webhook. An empty list of matchConditions matches all requests.
274
+ # There are a maximum of 64 match conditions allowed.
275
+ #
276
+ # The exact matching logic is (in order):
277
+ # 1. If ANY matchCondition evaluates to FALSE, the webhook is skipped.
278
+ # 2. If ALL matchConditions evaluate to TRUE, the webhook is called.
279
+ # 3. If any matchCondition evaluates to an error (but none are FALSE):
280
+ # - If failurePolicy=Deny, reject the request
281
+ # - If failurePolicy=NoOpinion, the error is ignored and the webhook is skipped
269
282
matchConditions :
283
+ # expression represents the expression which will be evaluated by CEL. Must evaluate to bool.
284
+ # CEL expressions have access to the contents of the SubjectAccessReview
285
+ # in the version specified by subjectAccessReviewVersion in the request variable.
286
+ # Documentation on CEL: https://kubernetes.io/docs/reference/using-api/cel/
270
287
- expression : |
271
288
request.resourceAttributes.namespace == 'kube-system'
272
289
- expression : |
0 commit comments