-
Notifications
You must be signed in to change notification settings - Fork 40.3k
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
Add namespace to DRA adminAccess ValidatingAdmissionPolicy message #129530
Conversation
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The 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-sigs/prow repository. |
/cc @pohly |
@@ -25,7 +25,7 @@ spec: | |||
validations: | |||
- expression: '! object.spec.devices.requests.exists(e, has(e.adminAccess) && e.adminAccess)' | |||
reason: Forbidden | |||
messageExpression: '"admin access to devices not enabled"' # in namespace " + object.metadata.namespace' - need to use __namespace__, but somehow that also doesn't work. |
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 explained the rationale for this change here: #129514 (comment)
/cc @bart0sh |
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.
/lgtm
/approve
This VAP remains relevant as example for Kubernetes 1.32, so it's worthwhile enhancing it even if 1.33 later starts to use something else.
Thanks @nojnhuh for tracking this down!
LGTM label has been added. Git tree hash: 606e4f58ba6c646eee6d682621c1196a74461c54
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: nojnhuh, pohly 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 |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
This PR adds the namespace to the failure message generated by the example ValidatingAdmissionPolicy for ResourceClaims and ResourceClaimTemplates when
adminAccess
is forbidden.Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: