argoproj / argo-cd

Declarative Continuous Deployment for Kubernetes
https://argo-cd.readthedocs.io
Apache License 2.0
17.92k stars 5.46k forks source link

helm template error on "argocd app set --helm-set" #11965

Open jdomag opened 1 year ago

jdomag commented 1 year ago

Checklist:

Describe the bug

I deployed via argocd helm chart that has the dependencies in Chart.yaml. Whenever I try to set a values for that sub-chart using command: argocd app set APP1 --helm-set subChart.image.tag=1.2.3 argo-repo server logs an error:

level=error msg="`helm template . --name-template APP1 --namespace default (...output omitted for clarity...)
Error: An error occurred while checking for chart dependencies. You may need  │
│ to run `helm dependency build` to fetch missing dependencies: found in Chart.yaml, but missing in charts/ directory: app1-helm\nError: plugin \"secrets\" exited with error

I also use helm secret plugin as a wrapper for helm for sops support, but I don't think it's related.

To Reproduce

Deploy any helm chart with sub-charts (dependency in Chart.yaml). Set any value of that subchart via argo cli "argocd app set"

Expected behavior

No error is displayed or helm dependecy build is triggered as suggested by error message

Screenshots

Version argocd-server: v2.4.18+beef23b

jlfxt commented 9 months ago

Seeing the same error using ApplicationSets using a git generator and targeting helm charts with dependencies:

level=error msg="helm template . --name-template <omitted> --namespace <omitted> --kube-version 1.27 --values /tmp/_argocd-repo/b94bd55e-f98e-4440-8a94-7e9b628466fb/env-values.yaml --values /tmp/_argocd-repo/b94bd55e-f98e-4440-8a94-7e9b628466fb/values.yaml --values /tmp/3450740a-253c-479c-8ae3-a540f168bd5b --include-crds failed exit status 1: Error: An error occurred while checking for chart dependencies. You may need to run helm dependency build to fetch missing dependencies: found in Chart.yaml, but missing in charts/ directory: core" execID=3b8f9