Ensuring Correct Sync Order for Kargo Resources in Argo CD
How to use sync-waves to guarantee Kargo Project is applied before dependent resources
When new Kargo files are committed to the GitOps repository, Argo CD sometimes fails to apply dependent resources because the Kargo Project resource (which also triggers namespace creation via a webhook) isn’t applied first.
Manually syncing the resource in the Argo CD UI resolves the problem, but this interrupts GitOps automation.
Use the annotation argocd.argoproj.io/sync-wave
to explicitly control the apply order of Kargo resources.
-
Assign the lowest sync-wave to the
Project
resource (so it is created first). -
Follow with
ProjectConfig
at the next lowest wave. -
All other resources can have higher sync-wave values.
Sync-Wave Behavior
-
Sync waves control ordering during a sync operation.
-
Lower values are applied before higher values.
-
Resources with the same wave number are applied in parallel.
📖 Reference: Argo CD Sync Waves
Key Takeaways
-
Always assign the lowest sync-wave to the Kargo Project so the namespace is created first.
-
ProjectConfig
should follow immediately after. -
All other resources can be any higher value (≥3).
-
This ensures you won’t need manual "Sync" in the UI anymore — ordering is guaranteed at commit time.