Skip to content

Commit

Permalink
refactor the docs to not link to stackoverflow
Browse files Browse the repository at this point in the history
fix/docs/helm

Signed-off-by: phyzical <[email protected]>

fix/docs/helm

Signed-off-by: phyzical <[email protected]>
  • Loading branch information
phyzical committed Oct 7, 2023
1 parent ca07b8d commit 78368d2
Showing 1 changed file with 78 additions and 23 deletions.
101 changes: 78 additions & 23 deletions docs/user-guide/helm.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,8 @@ spec:
namespace: kubeseal
```
!!! note "When using multiple methods"
Order of precedence is `parameters > valuesObject > values > valueFiles > helm repository values.yaml` (see [this stackoverflow](https://stackoverflow.com/questions/76739856/what-is-the-precedence-setting-of-various-helm-values-in-an-argocd-application-m) for a more detailed example)

!!! note "When valuesFiles or values is used"
The list of parameters seen in the ui is not what is used for resources, rather it is the values/valuesObject merged with parameters (see [this issue](https://github.com/argoproj/argo-cd/issues/9213) incase it has been resolved)
As a workaround using parameters instead of values/valuesObject will provide a better overview of what will be used for resources
!!! note "When using multiple ways to provide values"
Order of precedence is `parameters > valuesObject > values > valueFiles > helm repository values.yaml` (see [Here](./helm.md#helm-value-precedence) for a more detailed example)

## Values Files

Expand Down Expand Up @@ -127,6 +123,65 @@ source:
value: LoadBalancer
```

## Helm Value Precedence
Values injections have the following order of precedence
`parameters > valuesObject > values > valueFiles > helm repository values.yaml`
Or rather

```
lowest -> valueFiles
-> values
-> valuesObject
highest -> parameters
```
so values/valuesObject trumps valueFiles, and parameters trump both.
Precedence of valueFiles themselves is the order they are defined in
```
if we have

valuesFile:
- values-file-2.yaml
- values-file-1.yaml

the last values-file i.e. values-file-1.yaml will trump the first
```
When multiple of the same key are found the last one wins i.e
```
e.g. if we only have values-file-1.yaml and it contains

param1: value1
param1: value3000

we get param1=value3000
```
```
parameters:
- name: "param1"
value: value2
- name: "param1"
value: value1

the result will be param1=value1
```
```
values: |
param1: value2
param1: value5

the result will be param1=value5
```
!!! note "When valuesFiles or values is used"
The list of parameters seen in the ui is not what is used for resources, rather it is the values/valuesObject merged with parameters (see [this issue](https://github.com/argoproj/argo-cd/issues/9213) incase it has been resolved)
As a workaround using parameters instead of values/valuesObject will provide a better overview of what will be used for resources
## Helm Release Name
By default, the Helm release name is equal to the Application name to which it belongs. Sometimes, especially on a centralised Argo CD,
Expand Down Expand Up @@ -154,23 +209,23 @@ is any normal Kubernetes resource annotated with the `helm.sh/hook` annotation.

Argo CD supports many (most?) Helm hooks by mapping the Helm annotations onto Argo CD's own hook annotations:

| Helm Annotation | Notes |
|---|---|
| `helm.sh/hook: crd-install` | Supported as equivalent to `argocd.argoproj.io/hook: PreSync`. |
| `helm.sh/hook: pre-delete` | Not supported. In Helm stable there are 3 cases used to clean up CRDs and 3 to clean-up jobs. |
| `helm.sh/hook: pre-rollback` | Not supported. Never used in Helm stable. |
| `helm.sh/hook: pre-install` | Supported as equivalent to `argocd.argoproj.io/hook: PreSync`. |
| `helm.sh/hook: pre-upgrade` | Supported as equivalent to `argocd.argoproj.io/hook: PreSync`. |
| `helm.sh/hook: post-upgrade` | Supported as equivalent to `argocd.argoproj.io/hook: PostSync`. |
| `helm.sh/hook: post-install` | Supported as equivalent to `argocd.argoproj.io/hook: PostSync`. |
| `helm.sh/hook: post-delete` | Not supported. Never used in Helm stable. |
| `helm.sh/hook: post-rollback` | Not supported. Never used in Helm stable. |
| `helm.sh/hook: test-success` | Not supported. No equivalent in Argo CD. |
| `helm.sh/hook: test-failure` | Not supported. No equivalent in Argo CD. |
| `helm.sh/hook-delete-policy` | Supported. See also `argocd.argoproj.io/hook-delete-policy`). |
| `helm.sh/hook-delete-timeout` | Not supported. Never used in Helm stable |
| `helm.sh/hook-weight` | Supported as equivalent to `argocd.argoproj.io/sync-wave`. |
| `helm.sh/resource-policy: keep` | Supported as equivalent to `argocd.argoproj.io/sync-options: Delete=false`. |
| Helm Annotation | Notes |
| ------------------------------- | --------------------------------------------------------------------------------------------- |
| `helm.sh/hook: crd-install` | Supported as equivalent to `argocd.argoproj.io/hook: PreSync`. |
| `helm.sh/hook: pre-delete` | Not supported. In Helm stable there are 3 cases used to clean up CRDs and 3 to clean-up jobs. |
| `helm.sh/hook: pre-rollback` | Not supported. Never used in Helm stable. |
| `helm.sh/hook: pre-install` | Supported as equivalent to `argocd.argoproj.io/hook: PreSync`. |
| `helm.sh/hook: pre-upgrade` | Supported as equivalent to `argocd.argoproj.io/hook: PreSync`. |
| `helm.sh/hook: post-upgrade` | Supported as equivalent to `argocd.argoproj.io/hook: PostSync`. |
| `helm.sh/hook: post-install` | Supported as equivalent to `argocd.argoproj.io/hook: PostSync`. |
| `helm.sh/hook: post-delete` | Not supported. Never used in Helm stable. |
| `helm.sh/hook: post-rollback` | Not supported. Never used in Helm stable. |
| `helm.sh/hook: test-success` | Not supported. No equivalent in Argo CD. |
| `helm.sh/hook: test-failure` | Not supported. No equivalent in Argo CD. |
| `helm.sh/hook-delete-policy` | Supported. See also `argocd.argoproj.io/hook-delete-policy`). |
| `helm.sh/hook-delete-timeout` | Not supported. Never used in Helm stable |
| `helm.sh/hook-weight` | Supported as equivalent to `argocd.argoproj.io/sync-wave`. |
| `helm.sh/resource-policy: keep` | Supported as equivalent to `argocd.argoproj.io/sync-options: Delete=false`. |

Unsupported hooks are ignored. In Argo CD, hooks are created by using `kubectl apply`, rather than `kubectl create`. This means that if the hook is named and already exists, it will not change unless you have annotated it with `before-hook-creation`.

Expand Down

0 comments on commit 78368d2

Please sign in to comment.