From 26517c908c1ddf3b2db85917df33dac207e68219 Mon Sep 17 00:00:00 2001
From: Mark Burnett <mark.m.burnett@gmail.com>
Date: Thu, 25 May 2017 08:11:11 -0500
Subject: [PATCH] Remove ConfigMap hash annotations from StatefulSets

Kubernetes does not allow updating annotations on StatefulSets (it
actually only allows a couple of fields to be modified), so the
existence of these hash annotations makes it impossible to modify
configmap values.

This will be a problem not only for upgrades, but for normal operation
with charts like `mariadb`, which will occasionally require
`helm upgrade ...` to modify settings to allow recovery from certain
cluster failure modes.

Change-Id: I5f0433fc05c5aa22b4ad7ec296efbde3acca3d5a
---
 heat/templates/statefulset-engine.yaml          | 2 --
 magnum/templates/statefulset-conductor.yaml     | 2 --
 mistral/templates/statefulset-engine.yaml       | 2 --
 mistral/templates/statefulset-event-engine.yaml | 2 --
 senlin/templates/statefulset-engine.yaml        | 2 --
 5 files changed, 10 deletions(-)

diff --git a/heat/templates/statefulset-engine.yaml b/heat/templates/statefulset-engine.yaml
index 80f7bfe275..7602ff3698 100644
--- a/heat/templates/statefulset-engine.yaml
+++ b/heat/templates/statefulset-engine.yaml
@@ -28,8 +28,6 @@ spec:
       labels:
         app: heat-engine
       annotations:
-        configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.hash" }}
-        configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.hash" }}
         pod.beta.kubernetes.io/init-containers: '[
 {{ tuple $envAll $dependencies $mounts_heat_engine_init | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }}
         ]'
diff --git a/magnum/templates/statefulset-conductor.yaml b/magnum/templates/statefulset-conductor.yaml
index a053ebc31e..4c767ec7b7 100644
--- a/magnum/templates/statefulset-conductor.yaml
+++ b/magnum/templates/statefulset-conductor.yaml
@@ -28,8 +28,6 @@ spec:
       labels:
         app: magnum-conductor
       annotations:
-        configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.hash" }}
-        configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.hash" }}
         pod.beta.kubernetes.io/init-containers: '[
 {{ tuple $envAll $dependencies $mounts_magnum_conductor_init | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }}
         ]'
diff --git a/mistral/templates/statefulset-engine.yaml b/mistral/templates/statefulset-engine.yaml
index d94ab92bfa..4099deca17 100644
--- a/mistral/templates/statefulset-engine.yaml
+++ b/mistral/templates/statefulset-engine.yaml
@@ -28,8 +28,6 @@ spec:
       labels:
         app: mistral-engine
       annotations:
-        configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.hash" }}
-        configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.hash" }}
         pod.beta.kubernetes.io/init-containers: '[
 {{ tuple $envAll $dependencies $mounts_mistral_engine_init | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }}
         ]'
diff --git a/mistral/templates/statefulset-event-engine.yaml b/mistral/templates/statefulset-event-engine.yaml
index 0bfbed8b6c..7efc10e5ab 100644
--- a/mistral/templates/statefulset-event-engine.yaml
+++ b/mistral/templates/statefulset-event-engine.yaml
@@ -28,8 +28,6 @@ spec:
       labels:
         app: mistral-event-engine
       annotations:
-        configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.hash" }}
-        configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.hash" }}
         pod.beta.kubernetes.io/init-containers: '[
 {{ tuple $envAll $dependencies $mounts_mistral_event_engine_init | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }}
         ]'
diff --git a/senlin/templates/statefulset-engine.yaml b/senlin/templates/statefulset-engine.yaml
index 1a41a5548a..22db719763 100644
--- a/senlin/templates/statefulset-engine.yaml
+++ b/senlin/templates/statefulset-engine.yaml
@@ -28,8 +28,6 @@ spec:
       labels:
         app: senlin-engine
       annotations:
-        configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.hash" }}
-        configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.hash" }}
         pod.beta.kubernetes.io/init-containers: '[
 {{ tuple $envAll $dependencies $mounts_senlin_engine_init | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }}
         ]'