From 8dfd71d380f58e323c288c6b3f8b19a1082c2ab3 Mon Sep 17 00:00:00 2001 From: paydaycay Date: Fri, 29 Oct 2021 17:22:19 +0200 Subject: [PATCH] fix: auto-recreate pod when changing secrets or cm (#576) Hi, When we are adding or changing some values that are stored in the configmap or secret, pods are not automatically recreated. To fix this, I propose to add checksum on these two files like suggested in the official Helm doc [here](https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments) --- charts/mercure/templates/deployment.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/charts/mercure/templates/deployment.yaml b/charts/mercure/templates/deployment.yaml index afe8eca5..8c31c6b2 100644 --- a/charts/mercure/templates/deployment.yaml +++ b/charts/mercure/templates/deployment.yaml @@ -15,6 +15,8 @@ spec: metadata: {{- with .Values.podAnnotations }} annotations: + checksum/configmap: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} + checksum/secret: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }} {{- toYaml . | nindent 8 }} {{- end }} labels: