Skip to content
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

Change import role to cluster role #2645

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

manno
Copy link
Member

@manno manno commented Jul 17, 2024

Role bindings can link cluster roles, but they only grant access to the namespace of the role binding.
(https://octopus.com/blog/k8s-rbac-roles-and-bindings)

This reduces the dynamically created roles. It should result in a about two less roles per cluster. Import service accounts, roles and bindings are only required for the cluster import and are cleaned up.

Upgrading existing Clusters to the new ClusterRoles

To migrate existing clusters, it should be enough to delete the ClusterRegistrationToken to get rid of the old import service accounts and roles/rolebindings. The ClusterRegistrationToken usually has a TTL of 12h, after which it is deleted.

The sa, roles and rolebindings are recreated automatically, if the agent re-registers. However, an old ClusterRegistrationToken and it's RBAC resources will break that.

Fleet Registration - ClusterRegistration

@manno manno force-pushed the change-import-role-to-cluster-role branch from 14d7f44 to b3bbed2 Compare July 19, 2024 08:28
@manno manno force-pushed the change-import-role-to-cluster-role branch from b3bbed2 to 75337e0 Compare August 15, 2024 09:45
@manno manno force-pushed the change-import-role-to-cluster-role branch from 75337e0 to 195fdbd Compare August 15, 2024 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant