You want a smoke test to run after every deploy and mark the sync failed if it fails. How?
BeginnerScenarioSync Behaviour, Waves & Hooks
Answer
Situation read → Post-deploy verification as part of the sync.
What I'd do →
- Add a Job with
argocd.argoproj.io/hook: PostSyncandhook-delete-policy: BeforeHookCreation. - The Job curls key endpoints and exits non-zero on failure.
- Add a notification trigger
on-sync-failedso the team is alerted.
Why → PostSync runs after all Sync-phase resources are healthy, and a failed hook fails the operation.
Interview tip → Note that a failed PostSync does not roll back; pair it with Rollouts analysis for automatic protection.
More on Sync Behaviour, Waves & Hooks
A new release needs a database migration that must finish before the new pods start. How do you implement it in Argo CD?IntermediateYour app needs cert-manager's CRDs, an Issuer and then a Certificate, all in one Application. The first sync fails. What do you do?IntermediateAfter enabling `prune: true`, someone renames a folder and the next sync would delete a production StatefulSet and its PVCs. How do you prevent this class of incident?AdvancedAn HPA scales your Deployment, but Argo CD with self-heal keeps resetting replicas to 2. What do you do?BeginnerYou must change a Deployment's label selector, which is immutable. How do you roll it out with Argo CD?AdvancedA team wants Argo CD to deploy only during business hours, except for emergencies. How do you set it up?Beginner