Argo CD sync hooks and waves lab
Configure an Argo CD Application to use this directory as its source and target a namespace that already exists. Sync the Application and inspect its resource tree and Job logs.
The expected order is:
sync-lab-precheckruns in the PreSync phase at wave-1, before any ordinary Sync-phase resources.- The ConfigMap is applied at Sync wave
-2. It is still applied after PreSync because hook phase takes precedence over wave number. sync-lab-sync-checkruns as a Sync hook at wave-1.- The Deployment is applied at wave
0; the Service follows at wave1. - Once Sync resources are healthy,
sync-lab-postcheckruns in the PostSync phase and checks that the web endpoint serves the ConfigMap page.
Hooks with BeforeHookCreation,HookSucceeded are removed after success and cleaned up before a later sync recreates them. Remove the hook-delete-policy annotation to inspect completed Jobs between syncs.