Search code examples
kubernetesargocd

Argcd application generated via applicationsets are not visible in UI


I am trying to create applications in argocd using application sets and also i am using apps of apps pattern.

Here is root-app-dev.yaml

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: root-appbundle-app-dev
  namespace: argocd
  finalizers:
  - resources-finalizer.argocd.argoproj.io
spec:
  destination:
    namespace: default
    name: in-cluster
  project: appbundle-project-dev
  syncPolicy:
    automated: {} 
  source:
    path: argocd/apps-children/dev
    repoURL: https://github.com/<username>/argocd-root
    targetRevision: HEAD

And the applicationSet manifest located in the argocd/apps-children/dev folder

apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
  name: child-app-template
spec:
  goTemplate: true
  goTemplateOptions: ["missingkey=error"]
  generators:
  - matrix:
      generators:
      - git:
          repoURL: https://github.com/shamonshan/argocd-root
          revision: HEAD
          files:
          - path: configs/config.yml
      - list:
          elements: []
          elementsYaml: "{{ .configs.components | toJson }}"
  template:
    metadata:
      name: '{{.name}}'
    spec:
      project: '{{.project}}'
      destination:
        name: in-cluster
        namespace: '{{.namespace}}'
      source:
        repoURL: '{{.repoUrl}}'
        path : helm
        targetRevision: '{{.version}}'

Applied the manifest using kubectl apply -f argocd/root-app-dev.yml and i can see the parent application in the argocd UI but the applications that are created by the applicationsSet is not visible in the UI.

Current UI

Also no resources related are created in the cluster as well


Solution

  • with ApplicationSet if something like wrong templating occurs during the generating of the applications, the apps will not be generated :) you can see what's wrong with the applicationSet using this command

    kubectl describe applicationsets.argoproj.io -n argocd child-app-template
    

    If you need further help please provide us with the output.