forked from argoproj/argo-cd
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add UI GIF, docs for application health, resource hooks, tweaks to RE…
…ADME.md (argoproj#429)
- Loading branch information
Showing
6 changed files
with
116 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# ArgoCD Documentation | ||
|
||
## [Getting Started](getting_started.md) | ||
|
||
## Concepts | ||
* [Architecture](architecture.md) | ||
* [Tracking Strategies](tracking_strategies.md) | ||
|
||
## Features | ||
* [Resource Health](health.md) | ||
* [Resource Hooks](resource_hooks.md) | ||
* [Single Sign On](sso.md) | ||
* [Webhooks](webhook.md) | ||
* [RBAC](rbac.md) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Resource Health | ||
|
||
## Overview | ||
ArgoCD provides built-in health assessment for several standard Kubernetes types, which is then | ||
surfaced to the overall Application health status as a whole. The following checks are made for | ||
specific types of kuberentes resources: | ||
|
||
### Deployment, ReplicaSet, StatefulSet DaemonSet | ||
|
||
* Observed generation is equal to desired generation. | ||
* Number of **updated** replicas equals the number of desired replicas. | ||
|
||
### Service | ||
* If service type is of type `LoadBalancer`, the `status.loadBalancer.ingress` list is non-empty, | ||
with at least one value for `hostname` or `IP`. | ||
|
||
### Ingress | ||
* The `status.loadBalancer.ingress` list is non-empty, with at least one value for `hostname` or `IP`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# Resource Hooks | ||
|
||
## Overview | ||
|
||
Hooks are ways to interject custom logic before, during, and after a Sync operation. Some use cases | ||
for hooks are: | ||
* 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 (e.g. a blue/green deployment). | ||
* Using a `PostSync` hook to run integration and health checks after a deployment. | ||
|
||
## Usage | ||
Hooks are simply kubernetes manifests annotated with the `argocd.argoproj.io/hook` annotation. To | ||
make use of hooks, simply add the annotation to any resource: | ||
|
||
```yaml | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
generateName: schema-migrate- | ||
annotations: | ||
argocd.argoproj.io/hook: PreSync | ||
``` | ||
During a Sync operation, ArgoCD will create the resource during the appropriate stage of the | ||
deployment. Hooks can be any type of Kuberentes resource kind, but tend to be most useful as | ||
[Kubernetes Jobs](https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/) | ||
or [Argo Workflows](https://github.com/argoproj/argo). Multiple hooks can be specified as a comma | ||
separated list. | ||
## Available Hooks | ||
The following hooks are defined: | ||
| Hook | Description | | ||
|------|-------------| | ||
| `PreSync` | Executes prior to the apply of the manifests. | | ||
| `Sync` | Executes after all `PreSync` hooks completed and were successful. Occurs in conjuction with the apply of the manifests. | | ||
| `Skip` | Indicates to ArgoCD 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. | | ||
|
||
|
||
## Hook Deletion Policies | ||
|
||
Hooks can be deleted in an automatic fashion using the annotation: `argocd.argoproj.io/hook-delete-policy`. | ||
|
||
```yaml | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
generateName: integration-test- | ||
annotations: | ||
argocd.argoproj.io/hook: PostSync | ||
argocd.argoproj.io/hook-delete-policy: OnSuccess | ||
``` | ||
|
||
The following policies define when the hook will be deleted. | ||
|
||
| Policy | Description | | ||
|--------|-------------| | ||
| `OnSuccess` | The hook resource is deleted after the hook succeeded (e.g. Job/Workflow completed successfully). | | ||
| `OnFailure` | The hook resource is deleted after the hook failed. | |