From cea24ad83aafa9b255c8374902ffe30bde206c25 Mon Sep 17 00:00:00 2001 From: Hans Kristian Flaatten Date: Wed, 23 Aug 2017 03:34:37 +0200 Subject: [PATCH] [stable/grafana] Automatically roll Deployment when ConfigMap is changed (#1757) Ensure Grafana is redeployed whenever the server config og dashboards config has been modified by hashing the content of the config files as deployment annotations. Signed-off-by: Hans Kristian Flaatten --- stable/grafana/Chart.yaml | 2 +- stable/grafana/templates/deployment.yaml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/stable/grafana/Chart.yaml b/stable/grafana/Chart.yaml index d71555a0b5..f7e8611c2b 100755 --- a/stable/grafana/Chart.yaml +++ b/stable/grafana/Chart.yaml @@ -1,5 +1,5 @@ name: grafana -version: 0.4.3 +version: 0.4.4 description: The leading tool for querying and visualizing time series and metrics. home: https://grafana.net icon: https://raw.githubusercontent.com/grafana/grafana/master/public/img/logo_transparent_400x.png diff --git a/stable/grafana/templates/deployment.yaml b/stable/grafana/templates/deployment.yaml index be4ae6e735..03084e2da0 100644 --- a/stable/grafana/templates/deployment.yaml +++ b/stable/grafana/templates/deployment.yaml @@ -13,6 +13,8 @@ spec: template: metadata: annotations: + checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} + checksum/dashboards-config: {{ include (print $.Template.BasePath "/dashboards-configmap.yaml") . | sha256sum }} {{- range $key, $value := .Values.server.annotations }} {{ $key }}: {{ $value }} {{- end }}