Which resource types are commonly used as hooks?
Short answer
Jobs are the most common (run to completion for migrations, tests, seeds), and Pods for simple one-off tasks.
Advertisement
AModel answer
Jobs are the most common (run to completion for migrations, tests, seeds), and Pods for simple one-off tasks. Any Kubernetes resource can technically carry hook annotations, but run-to-completion workloads (Jobs) fit hook semantics best because ArgoCD tracks their success/failure to gate the sync.
Real-world example
Migrations, backups, and smoke tests are all implemented as hook Jobs that ArgoCD monitors to completion.
Likely follow-ups
- Why are Jobs ideal for hooks? | Can any resource be a hook?
Related topics