enhancements icon indicating copy to clipboard operation
enhancements copied to clipboard

KEP-3716: Admission Webhook Match Conditions

Open tallclair opened this issue 2 years ago • 3 comments

Introduce a webhook predicate concept. A predicate is a CEL expression which must evaluate to true for a request to be sent to a webhook.

Tracking issue: https://github.com/kubernetes/enhancements/issues/3716

This PR proposes an alternative (though not mutually exclusive) approach to https://github.com/kubernetes/enhancements/pull/3694.

This is based on a similar proposal for ValidatingAdmissionPolicy: https://github.com/kubernetes/enhancements/pull/3697

/cc @ivelichkovich @maxsmythe @jpbetz @andrewsykim

tallclair avatar Jan 10 '23 02:01 tallclair

@tallclair: GitHub didn't allow me to request PR reviews from the following users: ivelichkovich, maxsmythe.

Note that only kubernetes members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

Introduce a webhook predicate concept. A predicate is a CEL expression which must evaluate to true for a request to be sent to a webhook.

https://github.com/kubernetes/enhancements/issues/3716

This PR proposes an alternative (though not mutually exclusive) approach to https://github.com/kubernetes/enhancements/pull/3694.

This is based on a similar proposal for ValidatingAdmissionPolicy: https://github.com/kubernetes/enhancements/pull/3697

/cc @ivelichkovich @maxsmythe @jpbetz @andrewsykim

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar Jan 10 '23 02:01 k8s-ci-robot

/subscribe

dims avatar Jan 11 '23 19:01 dims

I'm in favor of this proposal. I like the consistency with validation policy CEL expression. I think that would make the support for secondary ACL checks "just work", but I'd like to be sure they're explicitly included as a use-case (our GC admission plugin does this when it checks if the user can finalize on * before building a full restmapping).

@jpbetz can you do a close read of the CEL explanation in the godoc? I had a comment on a couple spots that seemed unusual to me and I'd like to be sure I've properly interpreted them.

deads2k avatar Jan 24 '23 13:01 deads2k

Joe Betz can you do a close read of the CEL explanation in the godoc? I had a comment on a couple spots that seemed unusual to me and I'd like to be sure I've properly interpreted them.

Yes, I'm responsible for much of it such as the escaping sections and a bunch of the other common sections. (xref https://github.com/kubernetes/website/issues/39089), I'll do another pass on the sections specific to this KEP.

jpbetz avatar Jan 24 '23 18:01 jpbetz

minor updates requested, but I don't think they're contentious. lgtm otherwise. PRR also looks good and the advice from Han about metrics looks good as well.

/approve /assign @jpbetz @lavalamp

Letting Joe and/or Daniel have the lgtm.

deads2k avatar Feb 07 '23 20:02 deads2k

I have a couple comments.

lavalamp avatar Feb 07 '23 21:02 lavalamp

@tallclair FYI- https://github.com/kubernetes/enhancements/pull/3854 merged and can be referenced from this for this KEP as needed for authz CEL capabilities.

jpbetz avatar Feb 08 '23 15:02 jpbetz

/approve /lgtm

lavalamp avatar Feb 09 '23 00:02 lavalamp

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: deads2k, lavalamp, tallclair

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

k8s-ci-robot avatar Feb 09 '23 00:02 k8s-ci-robot