Join us
Recently we have Argo CD Sync options with examples, part of that, there is additional options with sync, those are Phases and waves. Why this is matters? This is sometime very useful, if you are expecting some manifest on sequence or some order. Let’s see about Argo CD Phases and waves, in this section.
Sync Phases
Argo CD executes a sync operation in a number of steps. At a high-level, there are three phases pre-sync, sync and post-sync. Within each phase you can have one or more waves, that allows you to ensure certain resources are healthy before subsequent resources are synced.
Synchronization can be configured using resource hooks. Hooks are ways to run scripts before, during, and after a Sync operation. Hooks can also be run if a Sync operation fails at any point. Some use cases for hooks are:
PreSync
hook to perform a database schema migration before deploying a new version of the app.Sync
hook to orchestrate a complex deployment requiring more sophistication than the Kubernetes rolling update strategy.PostSync
hook to run integration and health checks after a deployment.SyncFail
hook to run clean-up or finalizer logic if a Sync operation fails.Usage
Hooks are simply Kubernetes manifests tracked in the source repository of your Argo CD Application annotated with argocd.argoproj.io/hook
, e.g.:
During a Sync operation, Argo CD will apply the resource during the appropriate phase of the deployment. Hooks can be any type of Kubernetes resource kind, but tend to be Pod, Job or Argo Workflows. Multiple hooks can be specified as a comma separated list.
Note:
/metadata/name
) will only be created once. If you want a hook to be re-created each time either use BeforeHookCreation
policy (see below) or /metadata/generateName
.Continue reading it on https://foxutech.com/argo-cd-sync-phases-and-waves/
You can follow us on social media, to get some short knowledges regularly.
Join other developers and claim your FAUN account now!
Influence
Total Hits
Posts
Only registered users can post comments. Please, login or signup.