2

I want to add sync-wave annotations using Kustomize and then deploy resources using ArgoCD.

I expect that ArgoCD will kustomize resources first and then apply them to a cluster.

However ArgoCD try to create (apply) the Kustomize resource itself in a cluster instead of kustomization the other resources.

Here is the file structure

├── kustomization.yaml
└── ns.yaml
apiVersion: v1
kind: Namespace
metadata:
  name: test
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ns.yaml
commonAnnotations:
  argocd.argoproj.io/sync-wave: "-9999"

The namespace test is not being created. The sync-wave annotation is not added. Instead ArgoCD is waiting for a "resource" kind: Kustomization being created.

Why? How to fix this?

Michael Chudinov
  • 2,620
  • 28
  • 43

1 Answers1

0

Do you have directory recursion enabled in your Application manifest? That's my guess what is causing the issue. Try disabling directory recursion and it should work.

mikestef9
  • 201
  • 2
  • 7