From 9b53244a10b0760a08bd6cd7f6500f9f6de3d440 Mon Sep 17 00:00:00 2001 From: Matt McEuen Date: Fri, 14 Sep 2018 15:26:57 -0500 Subject: [PATCH] Add release uuid to pods and rc objects (deckhand) This PS adds the ability to attach a release uuid to pods and rc objects as desired. This can be used, for example, to force an artificial manifest change in CICD scenarios, for upgradability testing purposes. Change-Id: I69d7dfebe457423c58dc297ec84d02ca62230020 --- charts/deckhand/templates/deployment.yaml | 2 ++ charts/deckhand/templates/job-db-init.yaml | 2 ++ charts/deckhand/templates/job-db-sync.yaml | 2 ++ charts/deckhand/templates/tests/test-deckhand-api.yaml | 1 + 4 files changed, 7 insertions(+) diff --git a/charts/deckhand/templates/deployment.yaml b/charts/deckhand/templates/deployment.yaml index 7bc59dfe..b4b52055 100644 --- a/charts/deckhand/templates/deployment.yaml +++ b/charts/deckhand/templates/deployment.yaml @@ -25,6 +25,8 @@ apiVersion: apps/v1beta1 kind: Deployment metadata: name: deckhand-api + annotations: + {{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" }} spec: replicas: {{ .Values.pod.replicas.deckhand }} {{ tuple $envAll | include "helm-toolkit.snippets.kubernetes_upgrades_deployment" | indent 2 }} diff --git a/charts/deckhand/templates/job-db-init.yaml b/charts/deckhand/templates/job-db-init.yaml index 29c2565b..29864792 100644 --- a/charts/deckhand/templates/job-db-init.yaml +++ b/charts/deckhand/templates/job-db-init.yaml @@ -25,6 +25,8 @@ apiVersion: batch/v1 kind: Job metadata: name: deckhand-db-init + annotations: + {{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" }} spec: template: metadata: diff --git a/charts/deckhand/templates/job-db-sync.yaml b/charts/deckhand/templates/job-db-sync.yaml index d4066d83..e8f164ac 100644 --- a/charts/deckhand/templates/job-db-sync.yaml +++ b/charts/deckhand/templates/job-db-sync.yaml @@ -25,6 +25,8 @@ apiVersion: batch/v1 kind: Job metadata: name: deckhand-db-sync + annotations: + {{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" }} spec: template: metadata: diff --git a/charts/deckhand/templates/tests/test-deckhand-api.yaml b/charts/deckhand/templates/tests/test-deckhand-api.yaml index c6170526..f3e87e66 100644 --- a/charts/deckhand/templates/tests/test-deckhand-api.yaml +++ b/charts/deckhand/templates/tests/test-deckhand-api.yaml @@ -25,6 +25,7 @@ metadata: name: "{{ .Release.Name }}-deckhand-api-test" annotations: "helm.sh/hook": "test-success" + {{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" }} labels: {{ tuple $envAll "deckhand" "api-test" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }} spec: