You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When configuring the appset controller with ArgoCD 2.12.0, the controller fails to create applications because the service account does not have permission to list or watch AppProjects
level=info msg="listed ApplicationSets" count=1 type=createSecretEventHandler
7 reflector.go:539] pkg/mod/k8s.io/client-go@v0.29.6/tools/cache/reflector.go:229: failed to list *v1alpha1.AppProject:appprojects.argoproj.io is forbidden: User "system:serviceaccount:argocd:example-applicationset-controller" cannot list resource "appprojects" in API group "argoproj.io" in the namespace "argocd"
7 reflector.go:147] pkg/mod/k8s.io/client-go@v0.29.6/tools/cache/reflector.go:229: Failed to watch *v1alpha1.AppProject: failed to list *v1alpha1.AppProject: appprojects.argoproj.io is forbidden: User "system:serviceaccount:argocd:example-applicationset-controller" cannot list resource "appprojects" in API group "argoproj.io" in the namespace "argocd"
Thanks, @robertcoltheart , for reporting the issue. It seems that the problem is affecting only certain appset generators. For example, when I tried the clusters and list generators, I didn't see any errors in the logs, and the applications were created successfully. However, with the git generator, I did encounter these errors. Anyway, it's a bug that has been fixed upstream with argoproj/argo-cd#18943. I'll take a look at your PR shortly.
Describe the bug
Using argocd-operator
v0.11.0
When configuring the appset controller with ArgoCD 2.12.0, the controller fails to create applications because the service account does not have permission to list or watch AppProjects
Upon inspection, the policy rules created for app sets seems to only include
get
for appprojects and the controller also needslist
andwatch
. See https://github.com/argoproj-labs/argocd-operator/blob/master/controllers/argocd/policyrule.go#L497From the main Argo repo, this role should also include
list
andwatch
, see https://github.com/argoproj/argo-cd/blob/master/manifests/base/applicationset-controller/argocd-applicationset-controller-role.yaml#L27To Reproduce
Expected behavior
The correct role permissions should be used
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: