You've already forked reposilite-charts
docs(README): add tip how to ignore stakater's reloader annotations
All checks were successful
Generate README / generate-parameters (push) Successful in 29s
Helm / helm-lint (push) Successful in 16s
Helm / helm-unittest (push) Successful in 15s
Markdown linter / markdown-link-checker (push) Successful in 32s
Markdown linter / markdown-lint (push) Successful in 29s
All checks were successful
Generate README / generate-parameters (push) Successful in 29s
Helm / helm-lint (push) Successful in 16s
Helm / helm-unittest (push) Successful in 15s
Markdown linter / markdown-link-checker (push) Successful in 32s
Markdown linter / markdown-lint (push) Successful in 29s
This commit is contained in:
22
README.md
22
README.md
@@ -203,7 +203,8 @@ helm install --version "${CHART_VERSION}" reposilite volker.raschek/reposilite \
|
|||||||
|
|
||||||
The behavior whereby ArgoCD triggers a rolling update even though nothing appears to have changed often occurs in
|
The behavior whereby ArgoCD triggers a rolling update even though nothing appears to have changed often occurs in
|
||||||
connection with the helm concept `checksum/secret`, `checksum/configmap` or more generally, [Automatically Roll
|
connection with the helm concept `checksum/secret`, `checksum/configmap` or more generally, [Automatically Roll
|
||||||
Deployments](https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments).
|
Deployments](https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments). Please ensure, that no
|
||||||
|
third party application modifies the config maps or secret afterwards.
|
||||||
|
|
||||||
The problem with combining this concept with ArgoCD is that ArgoCD re-renders the Helm chart every time. Even if the
|
The problem with combining this concept with ArgoCD is that ArgoCD re-renders the Helm chart every time. Even if the
|
||||||
content of the config map or secret has not changed, there may be minimal differences (e.g., whitespace, chart version,
|
content of the config map or secret has not changed, there may be minimal differences (e.g., whitespace, chart version,
|
||||||
@@ -212,8 +213,10 @@ Helm render order, different timestamps).
|
|||||||
This changes the SHA256 hash, Argo sees a drift and trigger a rolling update of the deployment. Among other things, this
|
This changes the SHA256 hash, Argo sees a drift and trigger a rolling update of the deployment. Among other things, this
|
||||||
can lead to unnecessary notifications from ArgoCD.
|
can lead to unnecessary notifications from ArgoCD.
|
||||||
|
|
||||||
To avoid this, the annotation with the shasum must be ignored. Below is a diff that adds the `Application` to ignore all
|
To avoid this, the annotation with the shasum can be ignored. However, this negates the mechanism of [Automatically Roll
|
||||||
annotations with the prefix `checksum`.
|
Deployments](https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments).
|
||||||
|
|
||||||
|
Below is a diff that adds the `Application` to ignore all annotations with the prefix `checksum`.
|
||||||
|
|
||||||
> [WARN]
|
> [WARN]
|
||||||
> Configurations of `ignoreDifferences` always refer to the determination of a drift and whether a possible sync is
|
> Configurations of `ignoreDifferences` always refer to the determination of a drift and whether a possible sync is
|
||||||
@@ -232,9 +235,15 @@ annotations with the prefix `checksum`.
|
|||||||
+ - '.spec.template.metadata.annotations | with_entries(select(.key | startswith("checksum")))'
|
+ - '.spec.template.metadata.annotations | with_entries(select(.key | startswith("checksum")))'
|
||||||
```
|
```
|
||||||
|
|
||||||
If the reloader is configured as described in section [TLS certificate rotation](#tls-certificate-rotation), ensure that
|
The definition of ignoreDifferences ensures that annotations with the prefix checksum are ignored during a diff.
|
||||||
the shasum defined as annotation or environment variable with the prefix `stakater` is also ignored. Below are some
|
|
||||||
examples how to extend the `ignoreDifferences` configuration.
|
> [TIP]
|
||||||
|
> If the [reloader](https://github.com/stakater/Reloader) is configured as described in section [TLS certificate
|
||||||
|
> rotation](#tls-certificate-rotation), ensure that the shasum defined as annotation or environment variable is also
|
||||||
|
> ignored. The [reloader](https://github.com/stakater/Reloader) will modify the deployment based on his configuration
|
||||||
|
> and append additional annotations or environment variables containing the shasum. Below are some examples how to adapt
|
||||||
|
> the `ignoreDifferences` configuration to ignore only the annotations and environment variables of stakater's
|
||||||
|
> [reloader](https://github.com/stakater/Reloader).
|
||||||
|
|
||||||
```diff
|
```diff
|
||||||
apiVersion: argoproj.io/v1alpha1
|
apiVersion: argoproj.io/v1alpha1
|
||||||
@@ -244,7 +253,6 @@ examples how to extend the `ignoreDifferences` configuration.
|
|||||||
- group: apps
|
- group: apps
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
jqPathExpressions:
|
jqPathExpressions:
|
||||||
- '.spec.template.metadata.annotations | with_entries(select(.key | startswith("checksum")))'
|
|
||||||
+ - '.spec.template.metadata.annotations | with_entries(select(.key | startswith("stakater")))'
|
+ - '.spec.template.metadata.annotations | with_entries(select(.key | startswith("stakater")))'
|
||||||
+ - '.spec.template.spec.containers[].env[] | select(.name | startswith("STAKATER_"))'
|
+ - '.spec.template.spec.containers[].env[] | select(.name | startswith("STAKATER_"))'
|
||||||
```
|
```
|
||||||
|
Reference in New Issue
Block a user