Skip to content

Instantly share code, notes, and snippets.

@thezawzaw
Last active October 13, 2025 07:46
Show Gist options
  • Select an option

  • Save thezawzaw/15d2fb1f398b68b94a6d415b4f51595f to your computer and use it in GitHub Desktop.

Select an option

Save thezawzaw/15d2fb1f398b68b94a6d415b4f51595f to your computer and use it in GitHub Desktop.
Deploy a Remote Helm Chart with a Modified Values File from a Git Repository using Argo CD

Deploy a Remote Helm Chart with a Modified Values File from a Git Repository using Argo CD

argocd-multiple-sources

This page describes how to deploy a Helm chart from the remote Helm repository with modified or updated values.yaml file from the GitOps repository (GitLab or GitHub repository) using Argo CD.

Use Case

  • You want to deploy a Helm chart from the remote Helm repository.
  • And you also want to overwrite the values with only the modified or updated values.yaml file from your GitOps repository.

Argo CD: Multiple Sources Feature

Before Argo CD v2.6, the Helm chart and values files must be in the same GitOps repository.

In Argo CD v2.6, Multiple Sources was introduced as a beta feature that allows users to deploy an application using resources from various repositories, such as a Helm chart from a remote Helm repository and its values.yaml file from a Git repository.

Configuration

Configure an Argo CD application using multiple sources.

For Example, this Argo CD Applicaion configuration deploys the Grafana Helm chart from the remote repository (https://grafana.github.io/helm-charts) and its modified values.yaml from your GitOps repository to overwrite the values.

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: grafana
spec:
  destination:
    namespace: infra
    server: {{ .Values.spec.destination.server }}
  sources:
    # Grafana Helm Repository
    # This installs Grafana with the modified values.yaml file.
    - repoURL: "https://grafana.github.io/helm-charts"
      chart: grafana
      targetRevision: 10.1.0
      helm:
        valueFiles:
        - $k8s-gitops/helm/grafana/values.yaml
    # GitOps Source Repository that locates updated and modified local values.yaml file.
    - repoURL: https://github.com/thezawzaw/k8s-gitops-example.git
      targetRevision: infra
      ref: k8s-gitops
  project: default
  syncPolicy:
    automated:
      prune: true
      selfHeal: true
    syncOptions:
      - CreateNamespace=true

How it Works

Define your GitOps repository URL, target revision, and ref name using sources. Make sure you define "ref" as a variable name. In this example, ref name is k8s-gitops.

  sources:
    ...
    # GitOps Source Repository that locates updated and modified values.yaml file.
    - repoURL: https://github.com/thezawzaw/k8s-gitops-example.git
      targetRevision: infra
      ref: k8s-gitops

Then, set the values.yaml file path from your GitOps repository by calling the ref name you defined.

  sources:
    # Grafana Helm Repository
    # This installs Grafana with the modified values.yaml file.
    - repoURL: "https://grafana.github.io/helm-charts"
      chart: grafana
      targetRevision: 10.1.0
      helm:
        valueFiles:
        - $k8s-gitops/helm/grafana/values.yaml

Then, Argo CD will deploy the Grafana Helm chart with the modified values.yaml file from your Git repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment