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

multiple valueFiles does not work #18246

Closed
3 tasks done
envy16 opened this issue May 16, 2024 · 1 comment
Closed
3 tasks done

multiple valueFiles does not work #18246

envy16 opened this issue May 16, 2024 · 1 comment
Labels
bug Something isn't working component:config-management Tools specific issues (helm, kustomize etc)

Comments

@envy16
Copy link

envy16 commented May 16, 2024

Checklist:

  • I've searched in the docs and FAQ for my answer: https://bit.ly/argocd-faq.
  • I've included steps to reproduce the bug.
  • I've pasted the output of argocd version.

Describe the bug

i have argo Application yaml:

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: example
  namespace: gitops
spec:
  destination:
    namespace: some-ns
    server: 'https://kubernetes.default.svc'
  syncPolicy:
    automated:
      selfHeal: true
      prune: true
    syncOptions:
      - CreateNamespace=true
  project: myproj
  sources:
    - chart: common-app
      repoURL: 'https://artifactory.example.com/artifactory/common-helm-temp/'
      targetRevision: 0.6.3-rc-2
      helm:
        passCredentials: true
        releaseName: wp-api
        valueFiles:
          - $anltcs/anltcs-dev/wp-api.yaml
          - $anltcs/feature-flow/wp-api.yaml
        valuesObject:
          namespace: some-ns
          image:
            tag: latest
    - repoURL: 'https://git.example.com/common-templates/values-templates/analytics.git'
        targetRevision: WP-4506
        ref: anltcs

$anltcs/anltcs-dev/wp-api.yaml (yes, PGHOST is commented) :

app:
  env:
    #PGHOST:  postgresql.example.com
    POSTGRES_DB: dev_wpapi

$anltcs/feature-flow/wp-api.yaml:

app:
  env:
    PGHOST: postgresql
    POSTGRES_DB: feat_wpapi

Values from secondary file not applied, i get "POSTGRES_DB: dev_wpapi" inside my pod from Deployment, and completely missing PGHOST env.

If i change order like:

valueFiles:
    - $anltcs/feature-flow/wp-api.yaml
    - $anltcs/anltcs-dev/wp-api.yaml

i will get env inside pod "PGHOST: postgresql", but will be same "POSTGRES_DB: dev_wpapi" env.

To Reproduce

Expected behavior

Argo should use values Files precedence like in documentation (lower file have higher precedense) and get env:

app:
  env:
    PGHOST: postgresql
    POSTGRES_DB: feat_wpapi

while i use this order:

valueFiles:
          - $anltcs/anltcs-dev/wp-api.yaml
          - $anltcs/feature-flow/wp-api.yaml

Screenshots

Version

{
    "Version": "v2.10.2+fcf5d8c",
    "BuildDate": "2024-03-01T21:24:51Z",
    "GitCommit": "fcf5d8c2381b68ab1621b90be63913b12cca2eb7",
    "GitTreeState": "clean",
    "GoVersion": "go1.21.3",
    "Compiler": "gc",
    "Platform": "linux/amd64",
    "KustomizeVersion": "v5.2.1 2023-10-19T20:13:51Z",
    "HelmVersion": "v3.14.2+gc309b6f",
    "KubectlVersion": "v0.26.11",
    "JsonnetVersion": "v0.20.0"
}

Logs

Paste any relevant application logs here.
@envy16 envy16 added the bug Something isn't working label May 16, 2024
@todaywasawesome todaywasawesome added the component:config-management Tools specific issues (helm, kustomize etc) label May 16, 2024
@envy16 envy16 closed this as not planned Won't fix, can't repro, duplicate, stale May 23, 2024
@envy16
Copy link
Author

envy16 commented May 23, 2024

The reason for the non-standard behavior of merging multiple helm values files was a plugin helm-secrets https://github.com/jkroepke/helm-secrets

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working component:config-management Tools specific issues (helm, kustomize etc)
Projects
None yet
Development

No branches or pull requests

2 participants