Advertisement
Advanced ArgoCD, Sync Waves & Hooks

How do you retry a failed hook Job?

Short answer

Configure the Job's own backoffLimit and restartPolicy for pod-level retries, and ArgoCD's sync retry (syncPolicy.retry) to re-run the operation. Combine with BeforeHookCreation so each retry starts a fresh Job rather than colliding with the failed one.

Save ArgoCD mock interview
Advertisement
AModel answer
Configure the Job's own backoffLimit and restartPolicy for pod-level retries, and ArgoCD's sync retry (syncPolicy.retry) to re-run the operation. Combine with BeforeHookCreation so each retry starts a fresh Job rather than colliding with the failed one.
spec:                     # Job spec
  backoffLimit: 3
  template:
    spec:
      restartPolicy: OnFailure
Real-world example
A flaky migration hook retries three times at the pod level before the sync is considered failed.
Likely follow-ups
  • What controls Job-level retries? | How does BeforeHookCreation help retries?
Related topics