From 4aab6984860b4d263db99e679943f7700bf61f1d Mon Sep 17 00:00:00 2001 From: Phil Sphicas Date: Thu, 21 May 2020 18:54:14 +0000 Subject: [PATCH] Add configmap-hash annotations for etcd Adds configmap-hash annotations to the etcd anchor daemonset for configmap-bin and configmap-etc. Does not add hash annotations for configmap-certs or secret-keys, with the thought that if certs or keys are changed, some manual intervention might be warranted, and restarting the anchors automatically might not be desirable. Change-Id: I22ff8fafa5d37c10138ddaa4095174b25fc087d8 --- charts/etcd/templates/daemonset-anchor.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/charts/etcd/templates/daemonset-anchor.yaml b/charts/etcd/templates/daemonset-anchor.yaml index b6e12fec..47df998d 100644 --- a/charts/etcd/templates/daemonset-anchor.yaml +++ b/charts/etcd/templates/daemonset-anchor.yaml @@ -42,6 +42,12 @@ spec: {{ dict "envAll" $envAll "podName" "etcd-anchor" "containerNames" (list "etcdctl") | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 8 }} {{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" | indent 8 }} scheduler.alpha.kubernetes.io/critical-pod: '' +{{- if .Values.manifests.configmap_bin }} + configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }} +{{- end }} +{{- if .Values.manifests.configmap_etc }} + configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} +{{- end }} labels: {{ $labels | indent 8 }} spec: