Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why ArgoCD does not kustomize resources?

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?

like image 321
Michael Chudinov Avatar asked Jul 31 '26 08:07

Michael Chudinov


1 Answers

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.

like image 196
mikestef9 Avatar answered Aug 05 '26 18:08

mikestef9



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!