-
Notifications
You must be signed in to change notification settings - Fork 1.4k
🐛 KCP: Grant delete permissions to Secrets.
#13070
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
Conversation
|
@Gacko: The label(s) In response to this:
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. |
|
|
||
| // +kubebuilder:rbac:groups=core,resources=events,verbs=create;patch | ||
| // +kubebuilder:rbac:groups=core,resources=secrets,verbs=get;list;watch;create;update;patch | ||
| // +kubebuilder:rbac:groups=core,resources=secrets,verbs=get;list;watch;create;update;patch;delete |
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.
Shouldn't this only be on finalizers (as done this CAPA PR example)?
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.
ensureCertificatesOwnerRef indeed sets the owner reference and therefore seems to need delete permission as of https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#ownerreferencespermissionenforcement – @Gacko and me clarified this in chat. Excerpt from the docs:
This admission controller protects the access to the
metadata.ownerReferencesof an object so that only users with delete permission to the object can change it. This admission controller also protects the access tometadata.ownerReferences[x].blockOwnerDeletionof an object, so that only users with update permission to the finalizers subresource of the referenced owner can change it.
Leaving this comment here for others reviewers as reference.
|
LGTM |
|
/retest |
|
@Gacko thanks for this PR! |
|
LGTM label has been added. Git tree hash: 77e4048773bb0f8628cf6c35469942edc5ae77e4
|
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fabriziopandini 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 |
|
/cherry-pick release-1.12 |
|
@fabriziopandini: once the present PR merges, I will cherry-pick it on top of In response to this:
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. |
|
@fabriziopandini: new pull request created: #13097 In response to this:
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. |
What this PR does / why we need it:
In clusters with the OwnerReferencesPermissionEnforcement admission controller enabled, the KubeadmControlPlane Controller Manager fails to update the owner references of Secrets:
/area provider/control-plane-kubeadm