instruction: How do you implement GitOps workflows with ArgoCD and Kustomize?
output: Multiple Sources for an Application - Argo CD - Declarative GitOps CD for Kubernetes Skip to content Argo CD - Declarative GitOps CD for Kubernetes Multiple Sources for an Application Initializing search GitHub Argo CD - Declarative GitOps CD for Kubernetes GitHub Overview Understand The Basics Core Concepts Getting Started Operator Manual Operator Manual Overview Architectural Overview Installation Feature Maturity Argo CD Core Declarative Setup Applications in any namespace Ingress Configuration High Availability High Availability Overview Dynamic Cluster Distribution User Management User Management Overview Auth0 Microsoft Okta OneLogin Keycloak OpenUnison Google Zitadel Identity Center (AWS SSO) RBAC Configuration Security Security Overview Snyk Scans Verification of Argo CD Artifacts TLS configuration Cluster Management Cluster Bootstrapping Secret Management Disaster Recovery Reconcile Optimization Git Webhook Configuration Resource Health Resource Actions Custom Tooling Custom Styles UI Customization Metrics Web-based Terminal Config Management Plugins Deep Links Notifications Notifications Overview Triggers Templates Functions Triggers and Templates Catalog Monitoring Subscriptions Troubleshooting Troubleshooting commands Troubleshooting errors Examples Notification Services Notification Services Alertmanager AWS SQS Email GitHub Google Chat Grafana Mattermost NewRelic Opsgenie Overview PagerDuty PagerDuty V2 Pushover Rocket.Chat Slack Teams Telegram Webex Teams Webhook Troubleshooting Tools ApplicationSet ApplicationSet Introduction Installations Use Cases Security How ApplicationSet controller interacts with Argo CD Generators Generators Generators List Generator Cluster Generator Git Generator Matrix Generator Merge Generator SCM Provider Generator Cluster Decision Resource Generator Pull Request Generator Post Selector all generators Plugin Generator Template fields Template fields Templates Go Template Controlling Resource Modification Application Pruning & Resource Deletion Progressive Syncs Git File Generator Globbing ApplicationSet Specification Reference ApplicationSet in any namespace Server Configuration Parameters Server Configuration Parameters argocd-server Command Reference argocd-application-controller Command Reference argocd-repo-server Command Reference argocd-dex Command Reference Additional configuration method Upgrading Upgrading Overview v2.14 to 3.0 v2.13 to 2.14 v2.12 to 2.13 v2.11 to 2.12 v2.10 to 2.11 v2.9 to 2.10 v2.8 to 2.9 v2.7 to 2.8 v2.6 to 2.7 v2.5 to 2.6 v2.4 to 2.5 v2.3 to 2.4 v2.2 to 2.3 v2.1 to 2.2 v2.0 to 2.1 v1.8 to 2.0 v1.7 to 1.8 v1.6 to 1.7 v1.5 to 1.6 v1.4 to 1.5 v1.3 to 1.4 v1.2 to 1.3 v1.1 to 1.2 v1.0 to 1.1 Project Specification Reference User Guide User Guide Overview Tools Kustomize Helm OCI Importing Argo CD go packages Jsonnet Directory Tool Detection Projects Private Repositories Plugins Multiple Sources for an Application Multiple Sources for an Application Table of contents Helm value files from external Git repository GnuPG verification Automated Sync Policy Diffing Diffing Diff Strategies Diff Customization Orphaned Resources Monitoring Compare Options Sync Options Parameter Overrides Environment Variables Build Environment Tracking and Deployment Strategies Resource Tracking Resource hooks Selective Sync Sync Phases and Waves Sync Windows Sync Applications with Kubectl Skip Application Reconcile Generating Applications with ApplicationSet Automation from CI Pipelines App Deletion Best Practices Status Badge Add external URL Add extra Application info Notification subscriptions Annotations and Labels used by Argo CD Command Reference Application Specification Reference Developer Guide Developer Guide Overview Development Environment Development Cycle Submit Your PR Architecture Architecture Authentication and Authorization Component Architecture Code Contribution Guide Toolchain Guide MacOS users Release Process And Cadence Running Argo CD locally Debugging a local Argo CD instance Debugging a Remote ArgoCD Environment API Docs E2E Tests Managing Dependencies Continuous Integration (CI) Releasing Documentation Site Static Code Analysis Extensions Extensions UI Extensions Proxy Extensions Contribution FAQ Tilt Development FAQ Security Considerations Support Roadmap Releases ⧉ Blog ⧉ Table of contents Helm value files from external Git repository Multiple Sources for an Application &para; By default an Argo CD application is a link between a single source and a cluster. Sometimes however, you want to combine files from multiple locations to form a single Application. Argo CD has the ability to specify multiple sources for a single Application. Argo CD compiles all the sources and reconciles the combined resources. You can provide multiple sources using the sources field. When you specify the sources field, Argo CD will ignore the source (singular) field. See the below example for specifying multiple sources: apiVersion : argoproj.io/v1alpha1 kind : Application metadata : name : my-billing-app namespace : argocd spec : project : default destination : server : https://kubernetes.default.svc namespace : default sources : - repoURL : https://github.com/mycompany/billing-app.git path : manifests targetRevision : 8.5.1 - repoURL : https://github.com/mycompany/common-settings.git path : configmaps-billing targetRevision : HEAD The above example has two sources specified that need to be combined in order to create the "billing" application. Argo CD will generate the manifests for each source separately and combine the resulting manifests. Do not abuse multiple sources Note this feature is NOT destined as a generic way to group different/unrelated applications. Take a look at applicationsets and the app-of-apps pattern if you want to have a single entity for multiple applications. If you find yourself using more than 2-3 items in the sources array then you are almost certainly abusing this feature and you need to rethink your application grouping strategy. If multiple sources produce the same resource (same group , kind , name , and namespace ), the last source to produce the resource will take precedence. Argo CD will produce a RepeatedResourceWarning in this case, but it will sync the resources. This provides a convenient way to override a resource from a chart with a resource from a Git repo. Helm value files from external Git repository &para; One of the most common scenarios for using multiple sources is the following Your organization wants to use an external/public Helm chart You want to override the Helm values with your own local values You don't want to clone the Helm chart locally as well because that would lead to duplication and you would need to monitor it manually for upstream changes. In this scenario you can use the multiple sources features to combine the external chart with your own local values. Helm sources can reference value files from git sources. This allows you to use a third-party Helm chart with custom, git-hosted values. apiVersion : argoproj.io/v1alpha1 kind : Application spec : sources : - repoURL : &#39;https://prometheus-community.github.io/helm-charts&#39; chart : prometheus targetRevision : 15.7.1 helm : valueFiles : - $values/charts/prometheus/values.yaml - repoURL : &#39;https://git.example.com/org/value-files.git&#39; targetRevision : dev ref : values In the above example, the prometheus chart will use the value file from git.example.com/org/value-files.git . For Argo to reference the external Git repository containing the value files, you must set the ref parameter on the repository. In the above example, the parameter ref: values maps to the variable $values , which resolves to the root of the value-files repository. Note that the $values variable can only be used at the beginning of the value file path and that its path is always relative to the root of the referenced source. If the path field is set in the $values source, Argo CD will attempt to generate resources from the git repository at that URL. If the path field is not set, Argo CD will use the repository solely as a source of value files. Note Sources with the ref field set cannot include the chart field. Currently, Argo CD does not support using another Helm chart as a source for value files. Note Even when the ref field is configured with the path field, $value still represents the root of sources with the ref field. Consequently, valueFiles must be specified as relative paths from the root of sources. Previous Plugins Next GnuPG verification Made with Material for MkDocs