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

Clarify docs about Helm valueFiles from the same Git repository #22522

Open
dersimn opened this issue Mar 30, 2025 · 2 comments
Open

Clarify docs about Helm valueFiles from the same Git repository #22522

dersimn opened this issue Mar 30, 2025 · 2 comments
Labels
enhancement New feature or request

Comments

@dersimn
Copy link

dersimn commented Mar 30, 2025

There is a docs section about Helm value files from external Git repository explaining best-practice to include a values.yaml that's hosted in some external Git repository (other than the one where the ArgoCD Application is specified).

Please also add an example for a best practice to use a local values.yaml file within the directory structure of the ArgoCD Application:

|-- argocd
|   `-- nginx-app.yaml
`-- nginx
    `-- values.yaml

File argocd/nginx-app.yaml (in Git repo http://git.example.com/argocd/main-repo):

apiVersion: argoproj.io/v1alpha1
kind: Application
spec:
  sources:
    - repoURL: registry-1.docker.io/bitnamicharts
      chart: nginx
      targetRevision: 19.0.1
      helm:
        valueFiles:
          - $argo-main-repo/nginx/values.yaml
    - repoURL: http://git.example.com/argocd/main-repo  # this is the same we're reading this yaml from
      ref: argo-main-repo

Is this really the best practice to include a values.yaml from a sibling directory of the ArgoCD App itself or is there a better way without having to specify our own Git repo url again?
In case of migration etc. it's quite an easy fix to search&replace all the urls, but idk - sounds like a clear "don't repeat yourself" violation to me.

@dersimn dersimn added the enhancement New feature or request label Mar 30, 2025
@crenshaw-dev
Copy link
Member

I'm not sure it makes sense for Argo CD to be opinionated about this. It's fine to keep a values.yaml alongside the Argo CD app. It's also fine to store it elsewhere. If you have specific pros/cons to list, we could probably add those. But I'm not sure there's a firm best practice here.

@dersimn
Copy link
Author

dersimn commented Mar 30, 2025

But how to achieve this without hard-coding the GitHub URL in the YAML? Let‘s say I want to keep the GitHub independent from the target platform and specify the Gut repo only once (in the app-of-apps main-yaml)

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

No branches or pull requests

2 participants