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

Add clusterroles and dedicated service accounts for app management apps / remove permissive binding #85

Conversation

oliver-goetz
Copy link
Contributor

This PR adds cluster roles and for app-rollout and chart-assignment-controllers and starts them with dedicated service accounts. Additionally the permissive-binding is removed during deployment.

The cluster roles for app-rollout-controller are pretty easy and just include additional permissions for robots, apps, approllouts and chartassignments CRDs.

Chart-assignment-controller has now permissions for chartassignments and resourcesets CRDs and for namespaces. For convenience the cluster-admin role is assigned to its service account too, because we do not really have a concept yet, which Kubernetes objects we would like to be managed by chart-assignment-controller.

However, this change allows to investigate roles and permissions of other apps now, which was somehow pointless while a permissive-binding was existing. Thus, this PR might lead to "permission denied" in other apps.

@google-cla google-cla bot added the cla: yes cla signed label Oct 26, 2021
@oliver-goetz
Copy link
Contributor Author

I forgot roles & permissions for nginx in the first place 😅
That's fixed now.

@drigz
Copy link
Contributor

drigz commented Feb 17, 2022

Hi Oliver, sorry for taking so long to look at this! It looks good although I'd like to test it on our internal deployments before merging to check we won't break anything.

A side note: have you also reduced the privilege of the default GCP Service Account? If you're still running CRC in GKE, by default any pod has Editor access to the GCP project. I'm looking into how to change this, likely the first step will be to replace the Editor binding with some more specific bindings. For the base CRC workloads, I believe roles/cloudiot.provisioner is all that is required, but I haven't tested this yet. If this isn't relevant to your deployment, sorry for the noise.

@drigz drigz self-assigned this Feb 18, 2022
@copybara-service copybara-service bot closed this in 98bdad7 Mar 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes cla signed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants