diff --git a/Charts/tiled/templates/deployment.yaml b/Charts/tiled/templates/deployment.yaml index b340bde..7021db6 100644 --- a/Charts/tiled/templates/deployment.yaml +++ b/Charts/tiled/templates/deployment.yaml @@ -13,10 +13,13 @@ spec: {{- include "tiled.selectorLabels" . | nindent 6 }} template: metadata: - {{- with .Values.podAnnotations }} annotations: + {{- if .Values.rollOnConfigChange }} + checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} + {{- end }} + {{- with .Values.podAnnotations }} {{- toYaml . | nindent 8 }} - {{- end }} + {{- end }} labels: {{- include "tiled.labels" . | nindent 8 }} {{- with .Values.podLabels }} diff --git a/Charts/tiled/values.yaml b/Charts/tiled/values.yaml index 7a89b08..2ca1612 100644 --- a/Charts/tiled/values.yaml +++ b/Charts/tiled/values.yaml @@ -18,6 +18,11 @@ config: writable_storage: "/storage/data" init_if_not_exists: true +# Restart the tiled pods when their ConfigMap changes, by putting a checksum of +# it in a pod annotation. See +# https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments +rollOnConfigChange: true + # This will set the replicaset count more information can be found here: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/ replicaCount: 1