diff --git a/helm/minio/templates/deployment.yaml b/helm/minio/templates/deployment.yaml index f40df14d2..8c987afbd 100644 --- a/helm/minio/templates/deployment.yaml +++ b/helm/minio/templates/deployment.yaml @@ -44,8 +44,10 @@ spec: {{ toYaml .Values.podLabels | indent 8 }} {{- end }} annotations: +{{- if not .Values.ignoreChartChecksums }} checksum/secrets: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }} checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} +{{- end }} {{- if .Values.podAnnotations }} {{ toYaml .Values.podAnnotations | trimSuffix "\n" | indent 8 }} {{- end }} diff --git a/helm/minio/templates/gateway-deployment.yaml b/helm/minio/templates/gateway-deployment.yaml index 4ed62bb4c..2d51830f5 100644 --- a/helm/minio/templates/gateway-deployment.yaml +++ b/helm/minio/templates/gateway-deployment.yaml @@ -44,8 +44,10 @@ spec: {{ toYaml .Values.podLabels | indent 8 }} {{- end }} annotations: +{{- if not .Values.ignoreChartChecksums }} checksum/secrets: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }} checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} +{{- end }} {{- if .Values.podAnnotations }} {{ toYaml .Values.podAnnotations | trimSuffix "\n" | indent 8 }} {{- end }} diff --git a/helm/minio/templates/statefulset.yaml b/helm/minio/templates/statefulset.yaml index 9cc33eff0..edf730b66 100644 --- a/helm/minio/templates/statefulset.yaml +++ b/helm/minio/templates/statefulset.yaml @@ -70,8 +70,10 @@ spec: {{ toYaml .Values.podLabels | indent 8 }} {{- end }} annotations: +{{- if not .Values.ignoreChartChecksums }} checksum/secrets: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }} checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} +{{- end }} {{- if .Values.podAnnotations }} {{ toYaml .Values.podAnnotations | trimSuffix "\n" | indent 8 }} {{- end }} diff --git a/helm/minio/values.yaml b/helm/minio/values.yaml index 09e3419e4..e503e242e 100644 --- a/helm/minio/values.yaml +++ b/helm/minio/values.yaml @@ -37,6 +37,12 @@ additionalLabels: [] ## Additional annotations to include with deployment or statefulset additionalAnnotations: [] +## Typically the deployment/statefulset includes checksums of secrets/config, +## So that when these change on a subsequent helm install, the deployment/statefulset +## is restarted. This can result in unnecessary restarts under GitOps tooling such as +## flux, so set to "true" to disable this behaviour. +ignoreChartChecksums: false + ## Additional arguments to pass to minio binary extraArgs: []