argo-cd/docs/user-guide/multiple_sources.md

80 lines
3.6 KiB
Markdown
Raw Normal View History

feat: Multiple sources for applications (#2789) (#10432) * feat: support multiple sources for application Signed-off-by: ishitasequeira <ishiseq29@gmail.com> remove debug logging and unwanted code Signed-off-by: ishitasequeira <ishiseq29@gmail.com> fix lint and unit test errors Signed-off-by: ishitasequeira <ishiseq29@gmail.com> fix lint and unit test errors Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * fix bug introduced after rebase Signed-off-by: ishitasequeira <ishiseq29@gmail.com> executed make codegen Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * rebase with master Signed-off-by: ishitasequeira <ishiseq29@gmail.com> remove unwanted logging Signed-off-by: ishitasequeira <ishiseq29@gmail.com> fix ci failures Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * fix index out of bounds error Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * ui fixes Signed-off-by: ishitasequeira <ishiseq29@gmail.com> Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * add revisions to SyncOperation for rollback Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * change Source to *ApplicationSource in ApplicationSpec Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * fix env variable read logic for ValueFiles Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * update multiple sources doc Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * add repository lock and checkout target revision Signed-off-by: ishitasequeira <ishiseq29@gmail.com> fix codegen Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * checkout all sources before generating manifest Signed-off-by: ishitasequeira <ishiseq29@gmail.com> generate mock reposerverclient Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * update logic for returning ManifestResponse to avoid nil pointer issues Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * fix nil reference and key mismatch bugs; add more logs (#6) * fix nil reference and key mismatch bugs; add more logs * remove temporary comment * addressed the lint failure and added chart to RefTargeRevisionMapping * normalize git repo (#7) * do not leak lock releases * prevent deadlock * allow spec update * move settings fetch outside loop * cache busing * return err instead of logging it * no caching in test * fix cache key marshaling Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Rebase with master Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * update grpc field numbers Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * path resolution tests (#12) Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> do things in better ways Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> consolidate Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * add regex check for value of source.ref Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * add webhook tests Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> change Source to *ApplicationSource in ApplicationSpec Signed-off-by: ishitasequeira <ishiseq29@gmail.com> address PR comments Signed-off-by: ishitasequeira <ishiseq29@gmail.com> rebase with master Signed-off-by: ishitasequeira <ishiseq29@gmail.com> Retrigger CI pipeline Signed-off-by: ishitasequeira <ishiseq29@gmail.com> rebased with master Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * fix env variable read logic for ValueFiles Signed-off-by: ishitasequeira <ishiseq29@gmail.com> Address PR comments Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * add repository lock and checkout target revision Signed-off-by: ishitasequeira <ishiseq29@gmail.com> fix codegen Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * checkout all sources before generating manifest Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * generate mock reposerverclient Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * address comments Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * update logic for returning ManifestResponse to avoid nil pointer issues Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * fix nil reference and key mismatch bugs; add more logs (#6) * fix nil reference and key mismatch bugs; add more logs * remove temporary comment * addressed the lint failure and added chart to RefTargeRevisionMapping * normalize git repo (#7) * do not leak lock releases * prevent deadlock * allow spec update * move settings fetch outside loop * cache busing * return err instead of logging it * no caching in test * fix cache key marshaling Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Rebase with master Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * update grpc field numbers Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * add regex check for value of source.ref Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * Rebase with master Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * Added unit tests (#15) * add unit tests 1 * fix lint Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * fix application parameters tab, rebased UI changes, tests Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * More tests (#16) * more tests Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> fix lint error Signed-off-by: ishitasequeira <ishiseq29@gmail.com> Test get ref sources (#17) * test GetRefSources Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * fix lint Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Signed-off-by: ishitasequeira <ishiseq29@gmail.com> Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Co-authored-by: ishitasequeira <ishiseq29@gmail.com> GenerateManifests test (#18) * GenerateManifests test Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Fix broken tests (#19) * fix broken tests Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Symlink test (#20) * check referenced sources for out-of-bounds symlinks Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * unlock the values file repo before doing a symlink check (#22) Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * multi source docs (#21) * multi source docs Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * fix warning title Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * clarify Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * clarify Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * add e2e tests for multiple sources and fix UI lint (#23) * add e2e tests for multiple sources and fix UI lint Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * add auto-sync and hard refresh to e2e tests Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * change refresh type to RefreshTypeNormal for e2e Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * update e2e testcase with helm data Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * add TestMultiSourceAppWithSourceOverride Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * add missing yaml file Signed-off-by: ishitasequeira <ishiseq29@gmail.com> Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * rebase with master Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * rebase with master Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * fix lint Signed-off-by: ishitasequeira <ishiseq29@gmail.com> Signed-off-by: ishitasequeira <ishiseq29@gmail.com> Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-12-16 20:47:08 +00:00
# Multiple Sources for an Application
!!! warning "Beta Feature"
Specifying multiple sources for an application is a beta feature. The UI and CLI still generally behave as if only
the first source is specified. Full UI/CLI support will be added in a future release.
This feature is subject to change in backwards incompatible ways until it is marked stable.
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:
```yaml
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: guestbook
namespace: argocd
spec:
project: default
destination:
server: https://kubernetes.default.svc
namespace: default
sources:
- chart: elasticsearch
repoURL: https://helm.elastic.co
targetRevision: 8.5.1
feat: Multiple sources for applications (#2789) (#10432) * feat: support multiple sources for application Signed-off-by: ishitasequeira <ishiseq29@gmail.com> remove debug logging and unwanted code Signed-off-by: ishitasequeira <ishiseq29@gmail.com> fix lint and unit test errors Signed-off-by: ishitasequeira <ishiseq29@gmail.com> fix lint and unit test errors Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * fix bug introduced after rebase Signed-off-by: ishitasequeira <ishiseq29@gmail.com> executed make codegen Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * rebase with master Signed-off-by: ishitasequeira <ishiseq29@gmail.com> remove unwanted logging Signed-off-by: ishitasequeira <ishiseq29@gmail.com> fix ci failures Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * fix index out of bounds error Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * ui fixes Signed-off-by: ishitasequeira <ishiseq29@gmail.com> Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * add revisions to SyncOperation for rollback Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * change Source to *ApplicationSource in ApplicationSpec Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * fix env variable read logic for ValueFiles Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * update multiple sources doc Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * add repository lock and checkout target revision Signed-off-by: ishitasequeira <ishiseq29@gmail.com> fix codegen Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * checkout all sources before generating manifest Signed-off-by: ishitasequeira <ishiseq29@gmail.com> generate mock reposerverclient Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * update logic for returning ManifestResponse to avoid nil pointer issues Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * fix nil reference and key mismatch bugs; add more logs (#6) * fix nil reference and key mismatch bugs; add more logs * remove temporary comment * addressed the lint failure and added chart to RefTargeRevisionMapping * normalize git repo (#7) * do not leak lock releases * prevent deadlock * allow spec update * move settings fetch outside loop * cache busing * return err instead of logging it * no caching in test * fix cache key marshaling Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Rebase with master Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * update grpc field numbers Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * path resolution tests (#12) Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> do things in better ways Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> consolidate Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * add regex check for value of source.ref Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * add webhook tests Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> change Source to *ApplicationSource in ApplicationSpec Signed-off-by: ishitasequeira <ishiseq29@gmail.com> address PR comments Signed-off-by: ishitasequeira <ishiseq29@gmail.com> rebase with master Signed-off-by: ishitasequeira <ishiseq29@gmail.com> Retrigger CI pipeline Signed-off-by: ishitasequeira <ishiseq29@gmail.com> rebased with master Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * fix env variable read logic for ValueFiles Signed-off-by: ishitasequeira <ishiseq29@gmail.com> Address PR comments Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * add repository lock and checkout target revision Signed-off-by: ishitasequeira <ishiseq29@gmail.com> fix codegen Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * checkout all sources before generating manifest Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * generate mock reposerverclient Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * address comments Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * update logic for returning ManifestResponse to avoid nil pointer issues Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * fix nil reference and key mismatch bugs; add more logs (#6) * fix nil reference and key mismatch bugs; add more logs * remove temporary comment * addressed the lint failure and added chart to RefTargeRevisionMapping * normalize git repo (#7) * do not leak lock releases * prevent deadlock * allow spec update * move settings fetch outside loop * cache busing * return err instead of logging it * no caching in test * fix cache key marshaling Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Rebase with master Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * update grpc field numbers Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * add regex check for value of source.ref Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * Rebase with master Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * Added unit tests (#15) * add unit tests 1 * fix lint Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * fix application parameters tab, rebased UI changes, tests Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * More tests (#16) * more tests Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> fix lint error Signed-off-by: ishitasequeira <ishiseq29@gmail.com> Test get ref sources (#17) * test GetRefSources Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * fix lint Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Signed-off-by: ishitasequeira <ishiseq29@gmail.com> Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Co-authored-by: ishitasequeira <ishiseq29@gmail.com> GenerateManifests test (#18) * GenerateManifests test Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Fix broken tests (#19) * fix broken tests Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Symlink test (#20) * check referenced sources for out-of-bounds symlinks Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * unlock the values file repo before doing a symlink check (#22) Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * multi source docs (#21) * multi source docs Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * fix warning title Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * clarify Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * clarify Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * add e2e tests for multiple sources and fix UI lint (#23) * add e2e tests for multiple sources and fix UI lint Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * add auto-sync and hard refresh to e2e tests Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * change refresh type to RefreshTypeNormal for e2e Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * update e2e testcase with helm data Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * add TestMultiSourceAppWithSourceOverride Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * add missing yaml file Signed-off-by: ishitasequeira <ishiseq29@gmail.com> Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * rebase with master Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * rebase with master Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * fix lint Signed-off-by: ishitasequeira <ishiseq29@gmail.com> Signed-off-by: ishitasequeira <ishiseq29@gmail.com> Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-12-16 20:47:08 +00:00
- repoURL: https://github.com/argoproj/argocd-example-apps.git
path: guestbook
targetRevision: HEAD
```
The above example has two sources specified. Argo CD will generate the manifests for each source separately and combine
the resulting manifests.
!!! warning "Do not abuse multiple sources"
Note that the example above is just for illustration purposes. This feature is **NOT** destined as a generic way to group your applications. Take a look at [applicationsets](../user-guide/application-set.md) and the [app-of-apps](../../operator-manual/cluster-bootstrapping/) 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.
feat: Multiple sources for applications (#2789) (#10432) * feat: support multiple sources for application Signed-off-by: ishitasequeira <ishiseq29@gmail.com> remove debug logging and unwanted code Signed-off-by: ishitasequeira <ishiseq29@gmail.com> fix lint and unit test errors Signed-off-by: ishitasequeira <ishiseq29@gmail.com> fix lint and unit test errors Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * fix bug introduced after rebase Signed-off-by: ishitasequeira <ishiseq29@gmail.com> executed make codegen Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * rebase with master Signed-off-by: ishitasequeira <ishiseq29@gmail.com> remove unwanted logging Signed-off-by: ishitasequeira <ishiseq29@gmail.com> fix ci failures Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * fix index out of bounds error Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * ui fixes Signed-off-by: ishitasequeira <ishiseq29@gmail.com> Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * add revisions to SyncOperation for rollback Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * change Source to *ApplicationSource in ApplicationSpec Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * fix env variable read logic for ValueFiles Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * update multiple sources doc Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * add repository lock and checkout target revision Signed-off-by: ishitasequeira <ishiseq29@gmail.com> fix codegen Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * checkout all sources before generating manifest Signed-off-by: ishitasequeira <ishiseq29@gmail.com> generate mock reposerverclient Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * update logic for returning ManifestResponse to avoid nil pointer issues Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * fix nil reference and key mismatch bugs; add more logs (#6) * fix nil reference and key mismatch bugs; add more logs * remove temporary comment * addressed the lint failure and added chart to RefTargeRevisionMapping * normalize git repo (#7) * do not leak lock releases * prevent deadlock * allow spec update * move settings fetch outside loop * cache busing * return err instead of logging it * no caching in test * fix cache key marshaling Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Rebase with master Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * update grpc field numbers Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * path resolution tests (#12) Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> do things in better ways Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> consolidate Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * add regex check for value of source.ref Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * add webhook tests Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> change Source to *ApplicationSource in ApplicationSpec Signed-off-by: ishitasequeira <ishiseq29@gmail.com> address PR comments Signed-off-by: ishitasequeira <ishiseq29@gmail.com> rebase with master Signed-off-by: ishitasequeira <ishiseq29@gmail.com> Retrigger CI pipeline Signed-off-by: ishitasequeira <ishiseq29@gmail.com> rebased with master Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * fix env variable read logic for ValueFiles Signed-off-by: ishitasequeira <ishiseq29@gmail.com> Address PR comments Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * add repository lock and checkout target revision Signed-off-by: ishitasequeira <ishiseq29@gmail.com> fix codegen Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * checkout all sources before generating manifest Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * generate mock reposerverclient Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * address comments Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * update logic for returning ManifestResponse to avoid nil pointer issues Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * fix nil reference and key mismatch bugs; add more logs (#6) * fix nil reference and key mismatch bugs; add more logs * remove temporary comment * addressed the lint failure and added chart to RefTargeRevisionMapping * normalize git repo (#7) * do not leak lock releases * prevent deadlock * allow spec update * move settings fetch outside loop * cache busing * return err instead of logging it * no caching in test * fix cache key marshaling Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Rebase with master Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * update grpc field numbers Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * add regex check for value of source.ref Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * Rebase with master Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * Added unit tests (#15) * add unit tests 1 * fix lint Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * fix application parameters tab, rebased UI changes, tests Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * More tests (#16) * more tests Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> fix lint error Signed-off-by: ishitasequeira <ishiseq29@gmail.com> Test get ref sources (#17) * test GetRefSources Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * fix lint Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Signed-off-by: ishitasequeira <ishiseq29@gmail.com> Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Co-authored-by: ishitasequeira <ishiseq29@gmail.com> GenerateManifests test (#18) * GenerateManifests test Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Fix broken tests (#19) * fix broken tests Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Symlink test (#20) * check referenced sources for out-of-bounds symlinks Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * unlock the values file repo before doing a symlink check (#22) Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * multi source docs (#21) * multi source docs Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * fix warning title Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * clarify Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * clarify Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * add e2e tests for multiple sources and fix UI lint (#23) * add e2e tests for multiple sources and fix UI lint Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * add auto-sync and hard refresh to e2e tests Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * change refresh type to RefreshTypeNormal for e2e Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * update e2e testcase with helm data Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * add TestMultiSourceAppWithSourceOverride Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * add missing yaml file Signed-off-by: ishitasequeira <ishiseq29@gmail.com> Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * rebase with master Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * rebase with master Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * fix lint Signed-off-by: ishitasequeira <ishiseq29@gmail.com> Signed-off-by: ishitasequeira <ishiseq29@gmail.com> Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-12-16 20:47:08 +00:00
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
Helm sources can reference value files from git sources. This allows you to use a third-party Helm chart with custom,
git-hosted values.
```yaml
apiVersion: argoproj.io/v1alpha1
kind: Application
spec:
sources:
- repoURL: 'https://prometheus-community.github.io/helm-charts'
chart: prometheus
targetRevision: 15.7.1
helm:
valueFiles:
- $values/charts/prometheus/values.yaml
- repoURL: 'https://git.example.com/org/value-files.git'
feat: Multiple sources for applications (#2789) (#10432) * feat: support multiple sources for application Signed-off-by: ishitasequeira <ishiseq29@gmail.com> remove debug logging and unwanted code Signed-off-by: ishitasequeira <ishiseq29@gmail.com> fix lint and unit test errors Signed-off-by: ishitasequeira <ishiseq29@gmail.com> fix lint and unit test errors Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * fix bug introduced after rebase Signed-off-by: ishitasequeira <ishiseq29@gmail.com> executed make codegen Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * rebase with master Signed-off-by: ishitasequeira <ishiseq29@gmail.com> remove unwanted logging Signed-off-by: ishitasequeira <ishiseq29@gmail.com> fix ci failures Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * fix index out of bounds error Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * ui fixes Signed-off-by: ishitasequeira <ishiseq29@gmail.com> Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * add revisions to SyncOperation for rollback Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * change Source to *ApplicationSource in ApplicationSpec Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * fix env variable read logic for ValueFiles Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * update multiple sources doc Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * add repository lock and checkout target revision Signed-off-by: ishitasequeira <ishiseq29@gmail.com> fix codegen Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * checkout all sources before generating manifest Signed-off-by: ishitasequeira <ishiseq29@gmail.com> generate mock reposerverclient Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * update logic for returning ManifestResponse to avoid nil pointer issues Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * fix nil reference and key mismatch bugs; add more logs (#6) * fix nil reference and key mismatch bugs; add more logs * remove temporary comment * addressed the lint failure and added chart to RefTargeRevisionMapping * normalize git repo (#7) * do not leak lock releases * prevent deadlock * allow spec update * move settings fetch outside loop * cache busing * return err instead of logging it * no caching in test * fix cache key marshaling Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Rebase with master Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * update grpc field numbers Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * path resolution tests (#12) Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> do things in better ways Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> consolidate Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * add regex check for value of source.ref Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * add webhook tests Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> change Source to *ApplicationSource in ApplicationSpec Signed-off-by: ishitasequeira <ishiseq29@gmail.com> address PR comments Signed-off-by: ishitasequeira <ishiseq29@gmail.com> rebase with master Signed-off-by: ishitasequeira <ishiseq29@gmail.com> Retrigger CI pipeline Signed-off-by: ishitasequeira <ishiseq29@gmail.com> rebased with master Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * fix env variable read logic for ValueFiles Signed-off-by: ishitasequeira <ishiseq29@gmail.com> Address PR comments Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * add repository lock and checkout target revision Signed-off-by: ishitasequeira <ishiseq29@gmail.com> fix codegen Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * checkout all sources before generating manifest Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * generate mock reposerverclient Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * address comments Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * update logic for returning ManifestResponse to avoid nil pointer issues Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * fix nil reference and key mismatch bugs; add more logs (#6) * fix nil reference and key mismatch bugs; add more logs * remove temporary comment * addressed the lint failure and added chart to RefTargeRevisionMapping * normalize git repo (#7) * do not leak lock releases * prevent deadlock * allow spec update * move settings fetch outside loop * cache busing * return err instead of logging it * no caching in test * fix cache key marshaling Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Rebase with master Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * update grpc field numbers Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * add regex check for value of source.ref Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * Rebase with master Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * Added unit tests (#15) * add unit tests 1 * fix lint Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * fix application parameters tab, rebased UI changes, tests Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * More tests (#16) * more tests Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> fix lint error Signed-off-by: ishitasequeira <ishiseq29@gmail.com> Test get ref sources (#17) * test GetRefSources Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * fix lint Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Signed-off-by: ishitasequeira <ishiseq29@gmail.com> Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Co-authored-by: ishitasequeira <ishiseq29@gmail.com> GenerateManifests test (#18) * GenerateManifests test Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Fix broken tests (#19) * fix broken tests Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Symlink test (#20) * check referenced sources for out-of-bounds symlinks Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * unlock the values file repo before doing a symlink check (#22) Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * multi source docs (#21) * multi source docs Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * fix warning title Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * clarify Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * clarify Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * add e2e tests for multiple sources and fix UI lint (#23) * add e2e tests for multiple sources and fix UI lint Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * add auto-sync and hard refresh to e2e tests Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * change refresh type to RefreshTypeNormal for e2e Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * update e2e testcase with helm data Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * add TestMultiSourceAppWithSourceOverride Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * add missing yaml file Signed-off-by: ishitasequeira <ishiseq29@gmail.com> Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * rebase with master Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * rebase with master Signed-off-by: ishitasequeira <ishiseq29@gmail.com> * fix lint Signed-off-by: ishitasequeira <ishiseq29@gmail.com> Signed-off-by: ishitasequeira <ishiseq29@gmail.com> Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2022-12-16 20:47:08 +00:00
targetRevision: dev
ref: values
```
In the above example, the `prometheus` chart will use the value file from `git.example.gom/org/value-files.git`.
`$values` resolves to the root of the `value-files` repository. The `$values` variable may only be specified at the
beginning of the value file path.
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 must not also specify the `chart` field. Argo CD does not currently 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.