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?