This commit is contained in:
Simon Behar 2019-07-10 13:43:53 -05:00 committed by Alex Collins
parent 2a8807161a
commit a03f257205

View file

@ -12,6 +12,7 @@ and after a Sync operation. Some use cases for hooks are:
* Using a `Sync` hook to orchestrate a complex deployment requiring more sophistication than the
kubernetes rolling update strategy (e.g. a blue/green deployment).
* 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
Hooks are simply kubernetes manifests annotated with the `argocd.argoproj.io/hook` annotation. To
@ -41,6 +42,7 @@ The following hooks are defined:
| `Sync` | Executes after all `PreSync` hooks completed and were successful. Occurs in conjuction with the apply of the manifests. |
| `Skip` | Indicates to Argo CD to skip the apply of the manifest. This is typically used in conjunction with a `Sync` hook which is presumably handling the deployment in an alternate way (e.g. blue-green deployment) |
| `PostSync` | Executes after all `Sync` hooks completed and were successful, a succcessful apply, and all resources in a `Healthy` state. |
| `SyncFail` | Executes if and only if any part of the Sync operation fails. |
## Selective Sync