Theory

Updated

October 30, 2026

Theory: A Sync is a Phased Transaction with Optional Jobs

PreSync/Sync/PostSync hooks are Kubernetes Jobs/Pods Argo runs around apply. Waves order ordinary resources. A failed hook can fail the sync.

Invariants

  1. generateName lets hooks rerun; a fixed name plus BeforeHookCreation is a trap.
  2. Waves are integers on annotations, not a separate API.
  3. Hook cleanup policy is part of the theory (delete on success/failure).
PreSync jobs → apply waves 0..N → PostSync jobs

What can break

  • A hook that never completes (no backoff awareness).

How to read this chapter

Phases, names/waves, failures, anti-patterns.