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

Argocd appset generate with cluster generator is not working #20161

Closed
3 tasks done
pradithya opened this issue Sep 30, 2024 · 0 comments · Fixed by #20162
Closed
3 tasks done

Argocd appset generate with cluster generator is not working #20161

pradithya opened this issue Sep 30, 2024 · 0 comments · Fixed by #20162
Labels
bug Something isn't working

Comments

@pradithya
Copy link
Contributor

Checklist:

  • I've searched in the docs and FAQ for my answer: https://bit.ly/argocd-faq.
  • I've included steps to reproduce the bug.
  • I've pasted the output of argocd version.

Describe the bug

Calling argocd appset generate on applicationSet that use cluster generator cause the command to fail with missing clusterrole

> argocd appset generate appset.yaml
FATA[0000] rpc error: code = PermissionDenied desc = unable to generate Applications of ApplicationSet: error generating applications: error getting param sets from generators: error getting params from generator 1 of 4: child generator returned an error on parameter generation: error getting cluster secrets: secrets is forbidden: User "system:serviceaccount:argocd:argocd-server" cannot list resource "secrets" in API group "" at the cluster scope

To Reproduce

Create appset that use cluster generator. e.g.

apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
  name:my-appset
  namespace: argocd
spec:
  syncPolicy:
    preserveResourcesOnDeletion: true
  generators:
  - merge:
      mergeKeys:
      - server
      generators:
      - clusters:
          values:
            environment: '{{ index .metadata.labels "environment" }}'
            cluster: '{{ .name }}'
  template:
    ... 

Expected behavior

argocd appset generate should be successful

Version

argocd: v2.13.0-rc1+74a367d
  BuildDate: 2024-09-16T08:51:02Z
  GitCommit: 74a367d10e7110209610ba3ec225539ebe5f7522
  GitTreeState: clean
  GoVersion: go1.22.7
  Compiler: gc
  Platform: darwin/arm64
argocd-server: v2.13.0-rc2+0f083c9
  BuildDate: 2024-09-20T11:37:53Z
  GitCommit: 0f083c9e58638fc292cf064e294a1aa53caa5630
  GitTreeState: clean
  GoVersion: go1.23.1
  Compiler: gc
  Platform: linux/arm64
  Kustomize Version: v5.4.3 2024-07-19T16:40:33Z
  Helm Version: v3.15.2+g1a500d5
  Kubectl Version: v0.31.0
  Jsonnet Version: v0.20.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant