Creating an Environment as an Application of Applications
Learn how to create an environment as an application of applications.
We'll cover the following...
What do we need?
We need to define an Argo CD app of the apps. We’ll create an application that will reference those two applications (or whichever other we add there later). Those, in turn, will be referencing the “base” app manifests stored in application repositories.
That might be confusing, so let's look at yet another Argo CD Application definition.
cat apps.yaml
The output is as follows.
apiVersion: argoproj.io/v1alpha1kind: Applicationmetadata:name: productionnamespace: argocdfinalizers:- resources-finalizer.argocd.argoproj.iospec:project: productionsource:repoURL: https://github.com/vfarcic/argocd-production.gittargetRevision: HEADpath: helmdestination:server: https://kubernetes.default.svcnamespace: productionsyncPolicy:automated:selfHeal: trueprune: true
This one is almost the same as the previous application definition. The major difference is that it references the helm directory of the vfarcic/argocd-production repository. That’s the directory with the Chart that has the applications defined in devops-paradox.yaml and devops-toolkit.yaml files. As a result, Argo CD will synchronize changes to vfarcic/argocd-production and the repos referenced in devops-paradox.yaml and devops-toolkit.yaml.
We need to change that address to be your fork of that repo, or, to be more precise, to use your GitHub organization. As usual, we’ll use a bit of sed ...