Open Manuelraa opened 1 year ago
Good catch. Would you mind opening a PR to add a clusterrole and clusterrolebinding to the cluster-scope Argo CD manifests to give it access to ApplicationSet resources? The PR should probably add a release note that, if the user doesn't want to use appsets-in-any-namespace, they can remove the clusterrole/clusterrolebinding.
I completely misunderstood the issue, yours is about leader election, not appset access. I think the fix is to just add the RBAC you specified by default.
Can we restrict configmap access to a certain resource name?
Hi @crenshaw-dev I can find time to make that PR.
There is rules.resourceNames but it does not seem to allow a wildcard.
In my case the configmap is called 58ac56fa.applicationsets.argoproj.io
and the lease 58ac56fa.applicationsets.argoproj.io
.
Looks like a hash to me without knowing the functionality.
Which would mean limiting the rule to those specific entries would not be possible.
Hi @crenshaw-dev I can find time to make that PR.
There is rules.resourceNames but it does not seem to allow a wildcard.
In my case the configmap is called
58ac56fa.applicationsets.argoproj.io
and the lease58ac56fa.applicationsets.argoproj.io
. Looks like a hash to me without knowing the functionality. Which would mean limiting the rule to those specific entries would not be possible.
Correction to my last comment.
I have found that 58ac56fa.applicationsets.argoproj.io
is a hardcoded value so we are able to limit access to certain resource names.
https://github.com/argoproj/argo-cd/blob/e2e0da7fcc4e6a5cf040117a3af9c15a7d0c267f/cmd/argocd-applicationset-controller/commands/applicationset_controller.go#L118
Reflected in PR.
Could this be merged as part of the 2.9 RC?
Anything left here to enable leader election without custom patches for the rbac?
Checklist:
argocd version
.Describe the bug
Manifest is missing required RBAC rules for functionality. I was unable to find documentation saying those need to be added in order to use the features. v2.7.6 manifests/ha/install.yaml
I had to apply following Kustomize patches to get rid of RBAC permissions errors.
Role
argocd-applicationset-controller
is missing following permissions required when leader election is enabled.applicationsetcontroller.enable.leader.election=true
To Reproduce
Expected behavior
Manifest include all required RBAC rules.
Screenshots
Not applicable
Version
Logs
e.g. from argocd-applicationset-controller (While slowly adding all required permissions one by one)