From 168221adacf635c2a9c484640fba91d412f25231 Mon Sep 17 00:00:00 2001 From: Zoheb Shaikh <26975142+ZohebShaikh@users.noreply.github.com> Date: Wed, 14 Oct 2026 13:15:24 +0100 Subject: [PATCH] Roll tiled pods on ConfigMap change Add rollOnConfigChange (default true) to put a checksum of the ConfigMap in the pod annotations, per https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments Co-Authored-By: Claude Opus 5.5 --- Charts/tiled/templates/deployment.yaml | 7 +++++-- Charts/tiled/values.yaml | 5 +++++ 2 files changed, 10 insertions(+), 2 deletions(-) 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