From 95bcf1fb21a720d069f2f9286ee086d1e525179b Mon Sep 17 00:00:00 2001 From: Stefan Andres Date: Thu, 22 Dec 2022 10:34:50 +0100 Subject: [PATCH] Automatically rollover deployment when configmap changed. (#2831) Add annotation to deployment to auto rollover the deployment on changes to the configmap (https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments) Signed-off-by: Stefan Andres Signed-off-by: Stefan Andres --- charts/prometheus-json-exporter/Chart.yaml | 2 +- charts/prometheus-json-exporter/templates/deployment.yaml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/charts/prometheus-json-exporter/Chart.yaml b/charts/prometheus-json-exporter/Chart.yaml index f5ac63c1efdb..59e3f64e5aab 100644 --- a/charts/prometheus-json-exporter/Chart.yaml +++ b/charts/prometheus-json-exporter/Chart.yaml @@ -19,7 +19,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.6.0 +version: 0.6.1 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/prometheus-json-exporter/templates/deployment.yaml b/charts/prometheus-json-exporter/templates/deployment.yaml index 33a77f7b3ea5..0f16de9913ac 100644 --- a/charts/prometheus-json-exporter/templates/deployment.yaml +++ b/charts/prometheus-json-exporter/templates/deployment.yaml @@ -13,8 +13,9 @@ spec: {{- include "prometheus-json-exporter.selectorLabels" . | nindent 6 }} template: metadata: - {{- with .Values.podAnnotations }} annotations: + checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} + {{- with .Values.podAnnotations }} {{- toYaml . | nindent 8 }} {{- end }} labels: