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

How can i pass multiple Helm values files to a Kutomized Helm Chart ? #2183

Open
jbouchery opened this issue Jan 4, 2024 · 1 comment
Open

Comments

@jbouchery
Copy link

Here is my use case, I would like to add a Secret manifest to a Helm Chart and i have multiple Helm Values files.

So far, i have tried something like this :

helmfile.yaml

environments: 
  dev:

---
repositories:
  - name: openfga
    url: https://openfga.github.io/helm-charts

releases:
  - name: openfga
    chart: ./kubernetes/kustomize
    createNamespace: true
    values:
      - ./kubernetes/values/values.yaml.gotmpl
      - ./kubernetes/values/{{ .Environment.Name }}.yaml

kubernetes/kustomize/kustomization.yaml

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

helmCharts:
  - name: openfga
    repo: https://openfga.github.io/helm-charts
    version: 0.1.31
    releaseName: openfga

resources:
  - secret.yaml

I also have a secret in kubernetes/kustomize/secret.yaml and some values in ./kubernetes/values/values.yaml.gotmpl and ./kubernetes/values/{{ .Environment.Name }}.yaml

My helmfile template command seems to correctly add the secret but not my values.

I have something if i add valuesFile to the helmCharts in my kusomization.yaml but i would like to avoid that because i can only have one values file.

Am i missing something ?

Thanks for your help

@MattRipia
Copy link

You want additionalValuesFiles: flag :)

helmCharts:
  - name: chartName
    repo: https://charts.<domain>.com/chart
    version: 4.5.6
    releaseName: <releaseName>
    namespace: <namespace>
    valuesFile: <../../base-values.yaml>
    additionalValuesFiles:
      - <environment.yaml>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants