I want to use the App-of-apps practice with ArgoCD. So I created a simple folder structure like the one below. Then I created a project called dev and I created an app that will look inside the folder apps, so when new Application manifests are included, it will automatically create new applications. This last part works. Every time I add a new Application manifest, a new app is created as a child of the apps. However, the actual app that will monitor the respective folder and create the service and deployment is not created and I can't figure out what I am doing wrong. I have followed different tutorials that use Helm and Kustomize and all have given the same end result.

Can someone spot what am I missing here?

  • Folder structure
deployments/dev├── apps│ ├── app1.yaml│ └── app2.yaml├── app1│ ├── app1-deployment.yaml│ └── app1-svc.yaml└── app-2├── app2-deployment.yaml└── app2-svc.yaml
  • Parent app Application manifest that is watching /dev/apps folder
apiVersion: argoproj.io/v1alpha1kind: Applicationmetadata:name: root-appnamespace: argocdspec:destination:server: https://kubernetes.default.svcnamespace: argocdproject: devsource:path: deployments/dev/apps/repoURL: https://github.com/<repo>.gittargetRevision: HEADsyncPolicy:automated:prune: trueselfHeal: trueallowEmpty: true
  • And the App1 and App2 Application manifest is the same for both apps like so:
apiVersion: argoproj.io/v1alpha1kind: Applicationmetadata:name: <app1>/<app2>namespace: defaultspec:destination:server: https://kubernetes.default.svcnamespace: defaultproject: devsource:path: deployments/dev/<app1> or deployments/dev/<app2>repoURL: https://github.com/<repo>.gittargetRevision: HEADsyncPolicy:automated:prune: trueselfHeal: trueallowEmpty: true
1

Best Answer


Posting comment as the community wiki answer for better visibility


It turns out that at the moment ArgoCD can only recognize application declarations made in ArgoCD namespace, but @everspader was doing it in the default namespace. For more info, please refer to GitHub Issue