Skip to content
This repository has been archived by the owner on Jul 15, 2024. It is now read-only.

Ability to provide multiple values files for Helm chart, using multiple sources #632

Open
wojciechka opened this issue Mar 28, 2023 · 3 comments

Comments

@wojciechka
Copy link

ApplicationSet does not currently support an easy way to provide an array of values files. Until recently, I have been using ApplicationSet and a workaround I found in multiple places - providing a comma-separated list of files as single item to valueFiles.

After upgrading to ArgoCD 2.6, I am trying to leverage multiple sources and continue to use ApplicationSet to control it.

This works as long as items for valueFiles are inside the repository where the Helm chart is, but it's not possible to reference a file from another sources.

Here's a minimal snippet to reproduce it:

apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
  name: configtest
  namespace: argocd
spec:
  generators:
  - list:
      elements:
      - chart: ""
        name: configtest-working
        path: charts/configtest
        releaseName: configtest
        repoURL: .../path/to/chart-repo.git
        targetRevision: configtest
        # referencing two values files from Git repo containing the chart
        valueFiles: 'values.yaml,values-prod.yaml'
      - chart: ""
        name: configtest-not-working
        path: charts/configtest
        releaseName: configtest
        repoURL: .../path/to/chart-repo.git
        targetRevision: configtest
        # referencing external source does not work
        valueFiles: 'values.yaml,$config/values-prod.yaml'
  template:
    metadata:
      name: configtest-{{ name }}
    spec:
      destination:
        namespace: configtest
        server: https://kubernetes.default.svc
      project: configtest
      sources:
      - chart: '{{ chart }}'
        helm:
          releaseName: '{{ releaseName }}'
          valueFiles:
          - '{{ valueFiles }}'
        path: '{{ path }}'
        repoURL: '{{ repoURL }}'
        targetRevision: '{{ targetRevision }}'
      - ref: config
        repoURL: .../path/to/config.git
        targetRevision: main

It's understandable why the workaround does not work, but lack of multiple (and arbitrary number of) values files makes it difficult to deploy complex workloads using ArgoCD and ApplicationSet CRs.

Is there a way to preferably pass an array as one of the values for list generator and then pass that as value for valueFiles?

@itaig-taranis
Copy link

any update?

@eripa
Copy link

eripa commented Jul 17, 2023

There are a couple of issues in the main Argo CD repo tracking this:
argoproj/argo-cd#11213
argoproj/argo-cd#9583

@cdobbyn
Copy link

cdobbyn commented Sep 8, 2023

It's not presently possible to use OCI as a dependent chart, would like to use the workaround as defined here:
argoproj/argo-cd#12436

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

No branches or pull requests

4 participants