Sync Waves vs Pre-Sync Hooks for Zero-Downtime Argo CD Rollout
0 reputation · 19 Jan 2024, 01:50 UTC
Migration goal
Migrate a small application to a new version using Argo CD while keeping the previous version available until the replacement passes readiness checks. The cluster supports Kubernetes rolling updates for Deployments.
Decision constraint
Argo CD provides sync waves for declarative resource ordering and pre-sync hooks for dynamic gating before the main sync. Sync waves suit static sequencing, while a pre-sync hook can delay pruning until the new deployment is ready. The unresolved trade-off is whether static wave ordering alone prevents downtime or whether a hook is required for the cutover.
Assuming Argo CD v2.x with default sync behavior, which approach fits a small stateless application where the only constraint is zero downtime during sync?
- Should sync waves alone control termination order, or is a pre-sync hook necessary to gate readiness before old pods are removed?
- What effect does HookFailurePolicy have on sync continuity if the readiness check fails during the migration window?
- Does disabling prune introduce unacceptable stale-resource risk for this use case?