@@ -392,8 +392,10 @@ authorizers:
392
392
# - If failurePolicy=NoOpinion, then the error is ignored and the webhook is skipped
393
393
matchConditions :
394
394
# expression represents the expression which will be evaluated by CEL. Must evaluate to bool.
395
- # CEL expressions have access to the contents of the SubjectAccessReview
396
- # in the version specified by subjectAccessReviewVersion in the request variable.
395
+ # CEL expressions have access to the contents of the SubjectAccessReview in v1 version.
396
+ # If version specified by subjectAccessReviewVersion in the request variable is v1beta1,
397
+ # the contents would be converted to the v1 version before evaluating the CEL expression.
398
+ #
397
399
# Documentation on CEL: https://kubernetes.io/docs/reference/using-api/cel/
398
400
#
399
401
# only send resource requests to the webhook
@@ -433,12 +435,13 @@ the version supported by a webhook has to be mentioned using a required field
433
435
434
436
The user can define a CEL expression to determine whether a request needs to dispatched
435
437
to the authz webhook for which the expression has been defined. The user would have access
436
- to a `request` variable containing a `SubjectAccessReview` object in the version specified
437
- by `subjectAccessReviewVersion`.
438
+ to a `request` variable containing a `SubjectAccessReview` object in the `v1` version. If
439
+ the version specified by `subjectAccessReviewVersion` in the request variable is `v1beta1`,
440
+ the contents would be converted to the `v1` version before evaluating the CEL expression.
438
441
439
442
When no matchConditions are satisfied for a request, the webhook would be skipped. In such
440
- situations, the decision is logged in the audit log with the `authorization.k8s.io/webhook-skipped` annotation.
441
- Benefit of this is that resource and user info will also be logged.
443
+ situations, the decision is logged in the audit log with the `authorization.k8s.io/webhook-skipped`
444
+ annotation. Benefit of this is that resource and user info will also be logged.
442
445
443
446
The code path for enabling the above will only be triggered if the feature flag is enabled
444
447
while the feature is in alpha and beta.
0 commit comments