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

You want a smoke test to run after every deploy and mark the sync failed if it fails. How?

BeginnerScenarioSync Behaviour, Waves & Hooks
Answer

Situation read → Post-deploy verification as part of the sync.

What I'd do →

  1. Add a Job with argocd.argoproj.io/hook: PostSync and hook-delete-policy: BeforeHookCreation.
  2. The Job curls key endpoints and exits non-zero on failure.
  3. Add a notification trigger on-sync-failed so the team is alerted.

Why → PostSync runs after all Sync-phase resources are healthy, and a failed hook fails the operation.

Interview tip → Note that a failed PostSync does not roll back; pair it with Rollouts analysis for automatic protection.

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

More on Sync Behaviour, Waves & Hooks