From 0a481a8ef2bd5c2bf91d9ce1a51eb37909355e36 Mon Sep 17 00:00:00 2001 From: Alan Meadows Date: Mon, 9 Jan 2017 15:18:58 -0800 Subject: [PATCH] Consistent config map hashing across all existing charts * These annotations ensure that if configmaps change, the pods are redeployed according to their upgrade strategy. * This change excludes glance which has a pull request in progress to refactor it. --- keystone/templates/deployment.yaml | 2 ++ neutron/templates/daemonset-dhcp-agent.yaml | 3 +++ neutron/templates/daemonset-l3-agent.yaml | 3 +++ neutron/templates/daemonset-metadata-agent.yaml | 3 +++ neutron/templates/daemonset-ovs-agent.yaml | 3 +++ neutron/templates/daemonset-ovs-db.yaml | 3 +++ neutron/templates/daemonset-ovs-vswitchd.yaml | 3 +++ neutron/templates/deployment-server.yaml | 3 +++ rabbitmq/templates/{bin-configmap.yaml => configmap-bin.yaml} | 0 rabbitmq/templates/deployment.yaml | 2 ++ 10 files changed, 25 insertions(+) rename rabbitmq/templates/{bin-configmap.yaml => configmap-bin.yaml} (100%) diff --git a/keystone/templates/deployment.yaml b/keystone/templates/deployment.yaml index 827cb9c3..49917ada 100644 --- a/keystone/templates/deployment.yaml +++ b/keystone/templates/deployment.yaml @@ -17,6 +17,8 @@ spec: labels: app: keystone-api annotations: + configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "hash" }} + configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "hash" }} pod.beta.kubernetes.io/init-containers: '[ { "name": "init", diff --git a/neutron/templates/daemonset-dhcp-agent.yaml b/neutron/templates/daemonset-dhcp-agent.yaml index d34c6d99..11ef4e05 100644 --- a/neutron/templates/daemonset-dhcp-agent.yaml +++ b/neutron/templates/daemonset-dhcp-agent.yaml @@ -7,6 +7,9 @@ spec: metadata: labels: app: neutron-dhcp-agent + annotations: + configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "hash" }} + configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "hash" }} spec: nodeSelector: {{ .Values.labels.agent.dhcp.node_selector_key }}: {{ .Values.labels.agent.dhcp.node_selector_value }} diff --git a/neutron/templates/daemonset-l3-agent.yaml b/neutron/templates/daemonset-l3-agent.yaml index 7fb63e76..7428f944 100644 --- a/neutron/templates/daemonset-l3-agent.yaml +++ b/neutron/templates/daemonset-l3-agent.yaml @@ -7,6 +7,9 @@ spec: metadata: labels: app: neutron-l3-agent + annotations: + configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "hash" }} + configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "hash" }} spec: nodeSelector: {{ .Values.labels.agent.l3.node_selector_key }}: {{ .Values.labels.agent.l3.node_selector_value }} diff --git a/neutron/templates/daemonset-metadata-agent.yaml b/neutron/templates/daemonset-metadata-agent.yaml index d8e8daaa..2ffc16df 100644 --- a/neutron/templates/daemonset-metadata-agent.yaml +++ b/neutron/templates/daemonset-metadata-agent.yaml @@ -7,6 +7,9 @@ spec: metadata: labels: app: neutron-metadata-agent + annotations: + configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "hash" }} + configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "hash" }} spec: nodeSelector: {{ .Values.labels.agent.metadata.node_selector_key }}: {{ .Values.labels.agent.metadata.node_selector_value }} diff --git a/neutron/templates/daemonset-ovs-agent.yaml b/neutron/templates/daemonset-ovs-agent.yaml index 9cea0896..f1518ab3 100644 --- a/neutron/templates/daemonset-ovs-agent.yaml +++ b/neutron/templates/daemonset-ovs-agent.yaml @@ -7,6 +7,9 @@ spec: metadata: labels: app: ovs-agent + annotations: + configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "hash" }} + configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "hash" }} spec: nodeSelector: {{ .Values.labels.ovs.node_selector_key }}: {{ .Values.labels.ovs.node_selector_value }} diff --git a/neutron/templates/daemonset-ovs-db.yaml b/neutron/templates/daemonset-ovs-db.yaml index f817fa92..6b877abf 100644 --- a/neutron/templates/daemonset-ovs-db.yaml +++ b/neutron/templates/daemonset-ovs-db.yaml @@ -7,6 +7,9 @@ spec: metadata: labels: app: ovs-db + annotations: + configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "hash" }} + configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "hash" }} spec: nodeSelector: {{ .Values.labels.ovs.node_selector_key }}: {{ .Values.labels.ovs.node_selector_value }} diff --git a/neutron/templates/daemonset-ovs-vswitchd.yaml b/neutron/templates/daemonset-ovs-vswitchd.yaml index 9db15ac4..b07047e3 100644 --- a/neutron/templates/daemonset-ovs-vswitchd.yaml +++ b/neutron/templates/daemonset-ovs-vswitchd.yaml @@ -7,6 +7,9 @@ spec: metadata: labels: app: ovs-vswitchd + annotations: + configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "hash" }} + configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "hash" }} spec: nodeSelector: {{ .Values.labels.ovs.node_selector_key }}: {{ .Values.labels.ovs.node_selector_value }} diff --git a/neutron/templates/deployment-server.yaml b/neutron/templates/deployment-server.yaml index a9c37a34..66aa7412 100644 --- a/neutron/templates/deployment-server.yaml +++ b/neutron/templates/deployment-server.yaml @@ -16,6 +16,9 @@ spec: metadata: labels: app: neutron-server + annotations: + configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "hash" }} + configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "hash" }} spec: nodeSelector: {{ .Values.labels.server.node_selector_key }}: {{ .Values.labels.server.node_selector_value }} diff --git a/rabbitmq/templates/bin-configmap.yaml b/rabbitmq/templates/configmap-bin.yaml similarity index 100% rename from rabbitmq/templates/bin-configmap.yaml rename to rabbitmq/templates/configmap-bin.yaml diff --git a/rabbitmq/templates/deployment.yaml b/rabbitmq/templates/deployment.yaml index d4c19ccf..d622f8c5 100644 --- a/rabbitmq/templates/deployment.yaml +++ b/rabbitmq/templates/deployment.yaml @@ -16,6 +16,8 @@ spec: metadata: labels: app: rabbitmq + annotations: + configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "hash" }} spec: nodeSelector: {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}