[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 <hans@starefossen.com>
This commit is contained in:
Hans Kristian Flaatten
2017-08-23 07:04:37 +05:30
committed by Dhilip
parent cbe1baa072
commit cea24ad83a
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -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
+2
View File
@@ -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 }}