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

BranchPlanner cant create terraform resources in kubernetes (RC4) #1266

Open
hirenko-v opened this issue Mar 25, 2024 · 2 comments
Open

BranchPlanner cant create terraform resources in kubernetes (RC4) #1266

hirenko-v opened this issue Mar 25, 2024 · 2 comments

Comments

@hirenko-v
Copy link

Hi Team.
Seems like we have missing permissions in RC4 for branch-planner as it can't create terraform under the hood.

In RC3 we had ClusterRoleBinding that allows to do anything on the cluster
https://github.com/flux-iac/tofu-controller/blob/v0.16.0-rc.3/charts/tf-controller/templates/rbac.yaml#L166

It is removed in rc4 but we have nothing to allows branch-planner to create terraform resources. It uses tf-controller service account.

@chanwit
Copy link
Collaborator

chanwit commented Mar 25, 2024

AFAICT, there was a PR to scope down the RBAC to make things safer.

@yitsushi not sure if you could help point out what we would need here for the branch planner permissions?

@hirenko-v hirenko-v changed the title BranchPlannerc cant create terrafom resources in kubernetes (RC4) BranchPlanner cant create terraform resources in kubernetes (RC4) Mar 25, 2024
@yitsushi
Copy link
Collaborator

I think we need a create here: https://github.com/flux-iac/tofu-controller/pull/1099/files#diff-35334ce6e696c8dbc46c93b3ca840ece2918e87e5a6f517244f9bbad4d3ff651R53-R61

The PR went through as it says "for the reconciler", but in reality, branch planner uses the same service account. So I guess the proper solution would be to create a separate role set and use that for branch planner. For example the branch planner don't have to be able to create or patch finalizers, not even list them.

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

No branches or pull requests

3 participants