5

I am trying to setup ArgoCD for gitops. I used the ArgoCD helm chart to deploy it to my local Docker Desktop Kubernetes cluster. I am trying to use the app of apps pattern for ArgoCD.

The problem is that when I apply the yaml to create the root app, nothing happens. Here is the yaml (created by the command helm template apps/ -n argocd from the my public repo https://github.com/gajewa/gitops):

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: root
  finalizers:
    - resources-finalizer.argocd.argoproj.io
spec:
  destination:
    server: http://kubernetes.default.svc
    namespace: argocd
  project: default
  source:
    path: apps/
    repoURL: https://github.com/gajewa/gitops.git
    targetRevision: HEAD
  syncPolicy:
    automated:
      prune: true
      selfHeal: true

The resource is created but nothing in Argo UI actually happened. No application is visible. So I tried to create the app via the Web UI, even pasting the yaml in there. The application is created in the web ui and it seems to synchronise and see the repo with the yaml templates of prometheus and argo but it doesn't actually create the prometheus application in ArgoCD. And the prometheus part of the root app is forever progressing.

Here are some screenshots: The main page with the root application (where also argo-cd and prometheus should be visible but aren't): enter image description here And then the root app view where something is created for each template but Argo seems that it can't create kubernetes deployments/pods etc from this: enter image description here

I thought maybe the CRD definitions are not present in the k8s cluster but I checked and they're there:

λ kubectl get crd
NAME                       CREATED AT
applications.argoproj.io   2021-10-30T16:27:07Z
appprojects.argoproj.io    2021-10-30T16:27:07Z

I've ran out of things to check why the apps aren't actually deployed. I was going by this tutorial: https://www.arthurkoziel.com/setting-up-argocd-with-helm/

Matt
  • 194
  • 1
  • 1
  • 14
  • You should be able to click in the individual root/argocd/prometheus boxes and see the underlying applications. Have you tried that? – kazanaki Dec 03 '21 at 13:58
  • You said you apply the yaml to create the root app. How do you apply the yaml? Are you applying it in the right namespace? You can try to run `kubectl get apps -A` for all namespaces to see if you create it where needed. – Liviu Costea Dec 06 '21 at 11:10
  • I to have similar issue. And I do see kubectl get apps -A that they are created in namespace argocd and with the correct names. But it does not find custom project name. I do not want to use 'default' project. – Sanjeev May 18 '22 at 14:47

2 Answers2

5

the problem is you have to use the below code in your manifest file in metadata:

just please change the namespace with the name your argocd was deployed in that namespace. (default is argocd)

metadata:
  namespace: argocd
mehrdad.f
  • 71
  • 1
  • 8
0

From another SO post: https://stackoverflow.com/a/70276193/13641680

It turns out that at the moment ArgoCD can only recognize application declarations made in ArgoCD namespace,

Related GitHub Issue

everspader
  • 1,272
  • 14
  • 44