Argo CD Sync Phases and Waves

Sync Phases

  • Using a PreSync hook to perform a database schema migration before deploying a new version of the app.
  • Using a Sync hook to orchestrate a complex deployment requiring more sophistication than the Kubernetes rolling update strategy.
  • Using a PostSync hook to run integration and health checks after a deployment.
  • Using a SyncFail hook to run clean-up or finalizer logic if a Sync operation fails.

Usage

apiVersion: batch/v1
kind: Job
metadata:
generateName: schema-migrate-
annotations:
argocd.argoproj.io/hook: PreSync
  • Named hooks (i.e. ones with /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.
  • Hooks are not run during selective sync.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
FoxuTech

FoxuTech

62 Followers

Discuss about #Linux, #DevOps, #Docker, #kubernetes, #HowTo’s, #cloud & IT technologies like #argocd #crossplane #azure https://foxutech.com/