Interview Prep/GitOps & Argo CD/Sync Behaviour, Waves & Hooks

You want resources removed from Git to be deleted only after the new version is fully up. How?

BeginnerScenarioSync Behaviour, Waves & Hooks
Answer

Situation read → Pruning order matters during renames.

What I'd do →

  1. Add PruneLast=true to the app's sync options.
  2. For a single critical object, set it per resource with argocd.argoproj.io/sync-options: PruneLast=true.

Why → Pruning then happens after all waves are applied and healthy, so replacements exist first.

Interview tip → Give the Service rename example; it is the classic case.

All GitOps & Argo CD questions Roadmap: Argo CD (GitOps)

More on Sync Behaviour, Waves & Hooks