travisghansen / argo-cd-helmfile

Integration between argo-cd and helmfile
MIT License
223 stars 55 forks source link

Pass helm values from separate repo #60

Open chanakya-svt opened 5 months ago

chanakya-svt commented 5 months ago

Having trouble passing the helm values from one repository to another.

I have the following helmfile.yaml in some-repo-a

bases:
  - ../../../bases/helm-defaults.yaml
missingFileHandler: Error
releases:
  - name: "namespaces"
    namespace: "default"
    createNamespace: true
    chart: "../../../charts/namespaces"
    values:
      - {{ env "ARGOCD_ENV_NAMESPACES_VALUES_FILE" | quote }}

I have the following ArgoCD Application config in some-repo-b

spec:
      project: default
      sources:
        - repoURL: "https://github.com/some-repo-a"
          path: "src"
          targetRevision: "main"
          plugin:
            name: "helmfile"
            env:
              - name: "NAMESPACES_VALUES_FILE"
                value: $values/path/to/values.yaml
        - repoURL: "https://github.com/some-repo-b"
          targetRevision: main
          ref: values
     destination:
        server: "in-cluster"
        namespace: "default"

I configured the ArgoCD RepoServer following this guide

When I try to sync the application I am getting /path/to/values.yaml file or directory does not exists.

Is there a way to pass the values yaml from a different repository like the above setup.

ArgoCD version: v2.11.2 argo-cd-helmfile: v0.3.11 helmfile: v0.165.0

Thank you

chanakya-svt commented 5 months ago

@travisghansen any insights on this one?