Advertisement
Beginner ArgoCD, Sync Waves & Hooks

What resource kinds make good hooks and why Jobs specifically?

Short answer

Run-to-completion resources like Jobs are ideal because ArgoCD tracks their success/failure to gate the sync. Pods can work for simple tasks, but Jobs give retries, completions, and clean semantics for migrations, tests, and one-off tasks.

Save ArgoCD mock interview
Advertisement
AModel answer
Run-to-completion resources like Jobs are ideal because ArgoCD tracks their success/failure to gate the sync. Pods can work for simple tasks, but Jobs give retries, completions, and clean semantics for migrations, tests, and one-off tasks.
Real-world example
Migrations and smoke tests are Jobs so ArgoCD can wait for completion and detect failure.
Likely follow-ups
  • Why not use a Deployment as a hook? | What do Jobs provide over bare Pods?
Related topics