Skip to content

Commit

Permalink
fix: auto-recreate pod when changing secrets or cm (#576)
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
paydaycay committed Oct 29, 2021
1 parent 87fb0db commit 8dfd71d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions charts/mercure/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 8dfd71d

Please sign in to comment.