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

A hook Job from the last sync failed and now every new sync is stuck waiting. How do you design hooks to avoid this?

IntermediateScenarioSync Behaviour, Waves & Hooks
Answer

Situation read → Hook lifecycle not managed.

What I'd do →

  1. Always set hook-delete-policy: BeforeHookCreation (plus HookSucceeded if you do not need logs).
  2. Set activeDeadlineSeconds and a low backoffLimit so hooks fail instead of hanging.
  3. Use generateName for hooks that must create a fresh Job every sync.
  4. For the stuck sync now: argocd app terminate-op, delete the old Job, sync again.

Why → Hooks are just resources; without delete policies and deadlines they collide or hang.

Interview tip → Mention terminate-op as the immediate unblock.

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

More on Sync Behaviour, Waves & Hooks