-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KEP-3488: promote validatingadmissionpolicy to beta #3949
Conversation
cici37
commented
Apr 10, 2023
- One-line PR description: Clear beta graduation criteria for CEL in Admission Control
- Issue link: CEL for Admission Control #3488
- Other comments:
Skipping CI for Draft Pull Request. |
/milestone v1.28 |
28d5008
to
241156a
Compare
/assign @johnbelamaric |
/hold I'd like to work through what needs to happen to achieve original goals of per-namespace parameters with cluster defined policy.
Sounds like we may have an API problem to address before we pin an API by moving to beta. |
Comments have been addressed and KEP updated with the new proposed design for namespaced policy binding. @deads2k Please take a look when have time. Thank you! |
also have use cases that need to be able to inspects the fields in CEL | ||
expressions. | ||
`namespaceObject` will provide access to all existing fields under namespace metadata, namespace spec and namespace status except for metadata.managedFields and metadata.ownerReferences. | ||
The fields could be directly accessed through `namespaceObject` variable. e.g. `namespaceObject.metadata.name` or `namespaceObject.status.phase`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
super nit: Can we call this variable objectNamespace
? It might be just me, but I'm looking for a name that hints at the fact that this is "the namespace of the object", and when I see namespaceObject
I interpret it as "a namespace that is an object"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is the implementation PR: kubernetes/kubernetes#118267
Maybe we could discuss there and update the KEP later?
EDIT: Oops, wrong PR. |
spec: | ||
policyName: "demo-policy.example.com" | ||
namespaceParamRef: | ||
name: "param-resource.example.com" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we want an option of name or label selector here to mean, "this particular one" or "honor all the parameter resources that match this label selector in that namespace" to allow slightly looser coupling. That allows evolution of namespace names using a kustomize style hash in each namespace with a single ValidatingAdmissionPolicyBinding working against many namespaces.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added. I haven't showed a kustomize example, but I have shown one with a label selector along with a summary of the behavior if the selector matches multiple resources.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added. I haven't showed a kustomize example, but I have shown one with a label selector along with a summary of the behavior if the selector matches multiple resources.
Commit 057a9c3 appears to be missing from the diff. Conflicting push somewhere?
It's exactly what I'm thinking though.
/lgtm holding for @johnbelamaric to approve PRR and a squash. I'm approving for the sig. |
Rebased to minimal set of commits. |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cici37, deads2k, johnbelamaric 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 |
/hold cancel |