ArgoCD app-of-apps create the child app but doesn't deploy the manifests inside the app

Viewed 2379

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/v1alpha1
kind: Application
metadata:
  name: root-app
  namespace: argocd
spec:
  destination:
    server: https://kubernetes.default.svc
    namespace: argocd
  project: dev
  source:
    path: deployments/dev/apps/
    repoURL: https://github.com/<repo>.git
    targetRevision: HEAD
  syncPolicy:
    automated:
      prune: true
      selfHeal: true
      allowEmpty: true
  • And the App1 and App2 Application manifest is the same for both apps like so:
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: <app1>/<app2>
  namespace: default
spec:
  destination:
    server: https://kubernetes.default.svc
    namespace: default
  project: dev
  source:
    path: deployments/dev/<app1> or deployments/dev/<app2>
    repoURL: https://github.com/<repo>.git
    targetRevision: HEAD
  syncPolicy:
    automated:
      prune: true
      selfHeal: true
      allowEmpty: true
1 Answers

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

Related