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

Cannot reference local values file when using Remote Helm chart #7257

Closed
MeNsaaH opened this issue Sep 19, 2021 · 11 comments
Closed

Cannot reference local values file when using Remote Helm chart #7257

MeNsaaH opened this issue Sep 19, 2021 · 11 comments
Labels
bug Something isn't working

Comments

@MeNsaaH
Copy link
Contributor

MeNsaaH commented Sep 19, 2021

Describe the bug

When using remote helm charts, I realized that all my values files I specify in the repository don't work. I don't know if this is by design. I'm trying to use it alongside the helm secrets plugin, hence the need to pass the values files externally via the schemed-path format (secrets://secrets.yaml)

Here's my app file

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: ingress-nginx
  namespace: argocd
spec:
  project: default

  destination:
    server: https://kubernetes.default.svc
    namespace: ingress

  source:
    repoURL: https://kubernetes.github.io/ingress-nginx
    targetRevision: 4.0.1
    chart: ingress-nginx

    helm:
      releaseName: ingress-nginx
      valueFiles:
        - secrets://.yaml
        - values.yaml

  syncPolicy:
    automated:
      prune: true
      selfHeal: true
    syncOptions:
    - CreateNamespace=true

Screenshots

If applicable, add screenshots to help explain your problem.

Version

Paste the output from `argocd version` here.

Logs

Paste any relevant application logs here.
@MeNsaaH MeNsaaH added the bug Something isn't working label Sep 19, 2021
@Brice187
Copy link

Maybe this gets fixed with #6280

@ericmeadows
Copy link

From what I can tell, he (and I, now) are asking to support a remote Helm chart using a git-backed values file. The way around this is that you have to create your own Helm chart locally and add said values.yaml file, making the external chart a dependency of an empty chart. I feel like there's a lot of entangled logic that Plumbr.ai would surface here...

@romulus-ai
Copy link

Would be nice to find a solution for that, no Idea how this could look like. However, to create an empty helmchart in a git repo for each external helmchart we are using is a bit overkill... However in my opinion it would be much easier if argocd would provide a mechanism for secrets..

@YperXristis
Copy link

YperXristis commented Apr 8, 2022

@kostis-codefresh @romulus-ai
Here is the solution I came up with which works for me, please share it.

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  annotations:
    argocd.argoproj.io/sync-wave: "6"
  name: prometheus-stack
  namespace: argocd
  finalizers:
  - resources-finalizer.argocd.argoproj.io
spec:
  destination:
    namespace: monitoring
    server: https://kubernetes.default.svc
  project: ska
  source:
    chart: kube-prometheus-stack
    helm:
      version: v3
      values: |
{{ .Files.Get "prometheus-stack-vaules.yaml" | indent 8 }}
    repoURL: https://prometheus-community.github.io/helm-charts
    targetRevision: 34.9.0
  syncPolicy:
    automated:
      selfHeal: true
      prune: false
    syncOptions:
    - CreateNamespace=true
   

@YperXristis
Copy link

Now you can put the values file in your repo and reference a remote helm repo.
one directory up I have the prometheus-stack-vaules.yaml file with all the values

@AharonIsraelCohen
Copy link

Now you can put the values file in your repo and reference a remote helm repo. one directory up I have the prometheus-stack-vaules.yaml file with all the values

Can you share us the code ?

@crenshaw-dev
Copy link
Member

I think this is a duplicate of #2789. A lot of workarounds are documented there.

A native solution (multi-source apps) should be available in 2.5.

@crenshaw-dev crenshaw-dev closed this as not planned Won't fix, can't repro, duplicate, stale Jul 11, 2022
@aostrovsky
Copy link

Now you can put the values file in your repo and reference a remote helm repo. one directory up I have the prometheus-stack-vaules.yaml file with all the values

Where you refer in application definition to repo where prometheus-stack-vaules.yaml exist?

@aostrovsky
Copy link

A native solution (multi-source apps) should be available in 2.5.

Any news when 2.5 will be out?

@crenshaw-dev
Copy link
Member

@aostrovsky I think an RC will be cut in the next 2-3 weeks.

@zakkg3
Copy link

zakkg3 commented May 31, 2023

ppl is looking for this here: https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/#helm-value-files-from-external-git-repository

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

No branches or pull requests

9 participants