From 3a3657b6e524a24e92ac0e409b39d50b514d2d89 Mon Sep 17 00:00:00 2001 From: "DODDA, PRATEEK REDDY" Date: Mon, 6 Jul 2020 10:41:28 -0500 Subject: [PATCH] Add configmap-hash annotations for deckhand Adds configmap-hash annotations to the job-db-init and job-db-sync for configmap-bin and configmap-etc. These annotations ensure that if configmaps change, the pods are redeployed according to their upgrade strategy. Change-Id: I8ff282d8279c934590d5308e9c26efaf65685e2b --- charts/deckhand/templates/job-db-init.yaml | 2 ++ charts/deckhand/templates/job-db-sync.yaml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/charts/deckhand/templates/job-db-init.yaml b/charts/deckhand/templates/job-db-init.yaml index 9eea456a..3df47e8b 100644 --- a/charts/deckhand/templates/job-db-init.yaml +++ b/charts/deckhand/templates/job-db-init.yaml @@ -35,6 +35,8 @@ spec: annotations: {{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" | indent 8 }} {{ dict "envAll" $envAll "podName" "deckhand-db-init" "containerNames" (list "init" "deckhand-db-init") | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 8 }} + configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }} + configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} spec: serviceAccountName: {{ $serviceAccountName }} restartPolicy: OnFailure diff --git a/charts/deckhand/templates/job-db-sync.yaml b/charts/deckhand/templates/job-db-sync.yaml index d1a39352..69cbd930 100644 --- a/charts/deckhand/templates/job-db-sync.yaml +++ b/charts/deckhand/templates/job-db-sync.yaml @@ -35,6 +35,8 @@ spec: annotations: {{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" | indent 8 }} {{ dict "envAll" $envAll "podName" "deckhand-db-sync" "containerNames" (list "init" "deckhand-db-sync") | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 8 }} + configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }} + configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} spec: serviceAccountName: {{ $serviceAccountName }} restartPolicy: OnFailure