How do you make a Job that runs on every sync but is not a hook?
AdvancedConceptSync Waves, Hooks, Health & Diffing
Answer
You mostly cannot, and should not try. A plain (non-hook) Job with a fixed name is created once; on later syncs it stays Synced and never reruns, and a changed pod template fails with field is immutable. If it must run every sync, make it a hook (Sync or PostSync) with BeforeHookCreation, or give the hook a generateName so each sync creates a new Job. If it must run only when its spec changes, keep it a normal resource and add argocd.argoproj.io/sync-options: Replace=true,Force=true so a changed template recreates it. Choosing deliberately avoids both the "never reruns" and the "immutable field" traps.