Replies: 1 comment
-
|
Please check this detailed guide of mine https://codefresh.io/blog/argocd-clusters-labels-with-apps/ And associated Git repo https://github.com/kostis-codefresh/multi-app-multi-value-argocd TL;DR you need to use multiple application sets |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Given the following the directory structure:
Let's assume the following clusters exist:
control-planeenvironments-devenvironments-testI've already rolled out the core part of
my-app, using an applicationSet and the cluster generator. Now, I want to have the ability to dynamically provision additional resources formy-app(for example, additional secrets, config maps, etc).I want to be able to do this as follows:
<cluster-type>/my-appshould be provisioned to all clusters of the given type (control-planeorenvironmentssuffix)<cluster-type>/my-app/<env>should be provisioned to all clusters of the given type (control-planeorenvironmentsprefix) and env name (devortestsuffix, in this example).I'm currently using two ApplicationSets for this, with the following generators:
For cluster-type specific resources:
And for env-specific resources, I have the exact same setup but use
apps/{{ .values.cluster_type }}/{{ .app_name }}/{{ .values.cluster_env }}as filter on thescmgenerator:Side note: I'm not using the
gitgenerator withdirectories, because I want to keep the ability to have arbitrary sub-directories.If i used the following git generator:
I would have a whole lot of undesired values in the matrix generator.
So, to sum up: my problem is that manifests may or may not exist at a path, and depending on that I want provision those manifests (or not).
Is there any way to do this in a single applicationSet, or do I have to either live with several ones or need to give up arbitrary sub-dirs?
Beta Was this translation helpful? Give feedback.
All reactions