-
Notifications
You must be signed in to change notification settings - Fork 1.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
✨ optimize rbac across controllers #10552
✨ optimize rbac across controllers #10552
Conversation
/test help |
@chrischdi: The specified target(s) for
The following commands are available to trigger optional jobs:
Use
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/test-infra repository. |
/test pull-cluster-api-e2e-conformance-ci-latest-main |
/test pull-cluster-api-e2e-conformance-ci-latest-main |
Failure is I think related to #10530 /test pull-cluster-api-e2e-main |
Let's do another round of tests /test pull-cluster-api-e2e-main |
…se the subresource directly
/test pull-cluster-api-e2e-conformance-ci-latest-main |
/hold for #10612 please :) |
/hold to wait for #10612 |
/hold cancel /assign @sbueringer @fabriziopandini |
Will take another look in a bit |
Thx! /lgtm |
LGTM label has been added. Git tree hash: ef567ae9f91581aa4e91d4509ad1f197a0f0b75b
|
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.
That's an awesome work, thank you
/lgtm
/approve
[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 |
What this PR does / why we need it:
I reviewed and changed some permissions to harden RBAC for our controllers.
RBAC removals:
clusters
create/delete/get/list/patch/update/watch
get/list/patch/update/watch
clusters/status
create/delete/get/list/patch/update/watch
get/list/patch/update/watch
clusters/finalizers
create/delete/get/list/patch/update/watch
get/list/patch/update/watch
nodes
create/delete/get/list/patch/update/watch
events
create/delete/get/list/patch/update/watch
create
events
create/delete/get/list/patch/update/watch
create
events
create/delete/get/list/patch/update/watch
create
kubeadmconfigs/finalizers
clusterresourcesets/finalizers
machinepools/finalizers
clusters/finalizers
machines/finalizers
machinedeployments/finalizers
machinehealthchecks/finalizers
machinesets/finalizers
machinedeployments/finalizers
machinesets/finalizers
dockermachinepools/finalizers
dockermachinepools/finalizers
dockerclusters/finalizers
dockermachines/finalizers
inmemoryclusters/finalizers
inmemorymachines/finalizers
*: this is okay, because for accessing nodes on managed clusters we always use the admin credentials and it is not related to rbac inside the management cluster (also for self-hosted).
*2: this is okay, because we never use the subresource for adding/removing finalizers
RBAC alignment (adding
update
wherepatch
is already allowed or addingget
andwatch
wherelist
is already allowed, xref)machinepools
list
get/list/watch
configmaps
get/list/watch/patch
get/list/watch/patch/update
secrets
get/list/watch/patch
get/list/watch/patch/update
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Part of #6554
Note: I did use controller-gen from kubernetes-sigs/controller-tools#937 to get a deduplicated output.
On top the following query helps to get a comparable output which can be pasted to google sheets or similar:
Note: kubernetes-sigs/controller-tools#937 would help to deduplicate and cleanup the resulting clusterroles/roles so they are better in getting compared or audited.
/area api
(there was no perfect matching area, alternative would be adding all areas of the controllers)