Replies: 1 comment 1 reply
-
Did you use argocd appsync --local correctly? If possible, try adding the --core option |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Argo newbie here. I'm trying to create a least privilege project role+token that can run a "argocd app sync --local " command.
edit: version
argocd: v2.11.4+e1284e1
BuildDate: 2024-07-03T00:41:55Z
GitCommit: e1284e1
GitTreeState: clean
GoVersion: go1.22.4
Compiler: gc
Platform: darwin/amd64
argocd-server: v2.11.4+e1284e1
My project role can run the "argocd app sync " fine, but gives me a blank error when I add --local. I was able to run this command as an admin.
FATA[0002] rpc error: code = PermissionDenied desc = permission denied
That error is quite different from normal errors:
FATA[0001] rpc error: code = PermissionDenied desc = permission denied: projects, create, *, sub: <svcacct_user>, iat: 2024-07-31T16:24:18Z
project role
Once I moved the role and permissions into argco-cm as a local user, I still wasn't able to run the local sync, but the logs showed me these calls were being made before the failures:
msg="received unary call /cluster.ClusterService/Get and msg="received unary call /project.ProjectService/GetDetailedProject
so I added these permissions to the global role in argco-cm:
and the local sync worked.
I wasn't able to add similar permissions to the project using the cli; I see projects/get is a builtin permission but the cli won't let me add a clusters/get permission, the cli targets the applications resource only:
argocd proj role add-policy myproject myprojectrole -a override -p allow -o '*'
I was able to add a "clusters" project policy via terraform ("oboukili/argocd"), but still got the same "blank" error:
p, proj:myproject:myprojectrole, clusters, get, myproject/*, allow
Is there a bug in the sync command that doesn't allow it to be run using a project role? The closest page I found discussing this was: GHSA-g623-jcgg-mhmm
Beta Was this translation helpful? Give feedback.
All reactions