3

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
everspader
  • 1,272
  • 14
  • 44
  • When you say "is not created" what do you mean? It is not shown in the UI? it is not shown in the CLI? What happens if you list all your apps from the CLI? Do you see it or not? Right now your question cannot be answered without additional details. – kazanaki Dec 03 '21 at 13:52
  • So the parent app is created in the UI and it's listed in the CLI as well. It has two child apps as it should. But the Application manifest of the child apps doesn't create the app in the UI as an independent app that will point to the deployment and service. At the apps level I only see the "apps" but inside it I see both app1 and app2 – everspader Dec 03 '21 at 14:35
  • what happens if you click on app1 and app2 inside the UI? What happens if you list them with the CLI? What happens if you manually use kubectl to inspect your cluster? – kazanaki Dec 03 '21 at 14:40
  • I managed to find the issue. It turns out that at the moment ArgoCD can only recognize application declarations made in argocd namespace but I was doing it in the default namespace. https://github.com/argoproj/argo-cd/issues/3474 – everspader Dec 04 '21 at 09:57

1 Answers1

2

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

Bazhikov
  • 765
  • 3
  • 11