From the course: Kubernetes: GitOps with Argo CD

Unlock this course with a free trial

Join today to access over 25,600 courses taught by industry experts.

Configuring sync waves and lifecycle hooks

Configuring sync waves and lifecycle hooks

From the course: Kubernetes: GitOps with Argo CD

Configuring sync waves and lifecycle hooks

Normally, when Argo CD deploys your infrastructure to Kubernetes, it does so in any order. So maybe you have a migration job, deployments, services, a config map, there is no particular order in which Argo CD provisions infrastructure. But this is something you may want to control in a production environment and this is where you'd use Sync Waves. Sync Waves let you control the order in which resources are applied during a sync by assigning them wave numbers. If you have dependencies across the infrastructure that you deploy within an application, you'd use wave numbers to set up these dependencies in the right order. For example, you may want to ensure that a database or custom resource definitions are deployed before the application ports. By assigning lower wave numbers to foundational resources and higher ones to dependent components, you guarantee a safe and orderly rollout. I'm working within the Argo CD public repo within the waves demo subfolder. Here, I first have set up a…

Contents