From d8f4a1fbe3b4d2ac9ed097bcb5ab575f134d99f6 Mon Sep 17 00:00:00 2001 From: Matt McEuen Date: Fri, 14 Sep 2018 18:19:36 -0500 Subject: [PATCH] Add release uuid to pods and rc objects (drydock) 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: I784c0ad26c34338c9acda3dbe271f2139ba3f1f9 --- charts/drydock/templates/deployment.yaml | 2 ++ charts/drydock/templates/job-drydock-db-init.yaml | 2 ++ charts/drydock/templates/job-drydock-db-sync.yaml | 2 ++ charts/drydock/templates/tests/test-drydock-api.yaml | 1 + charts/drydock/templates/tests/test-drydock-auth.yaml | 1 + tools/helm_tk.sh | 2 +- 6 files changed, 9 insertions(+), 1 deletion(-) diff --git a/charts/drydock/templates/deployment.yaml b/charts/drydock/templates/deployment.yaml index 9e25f684..ef70421f 100644 --- a/charts/drydock/templates/deployment.yaml +++ b/charts/drydock/templates/deployment.yaml @@ -22,6 +22,8 @@ apiVersion: apps/v1beta1 kind: Deployment metadata: name: drydock-api + annotations: + {{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" }} spec: replicas: {{ .Values.replicas.drydock }} {{ tuple $envAll | include "helm-toolkit.snippets.kubernetes_upgrades_deployment" | indent 2 }} diff --git a/charts/drydock/templates/job-drydock-db-init.yaml b/charts/drydock/templates/job-drydock-db-init.yaml index 4591ed1d..0550361a 100644 --- a/charts/drydock/templates/job-drydock-db-init.yaml +++ b/charts/drydock/templates/job-drydock-db-init.yaml @@ -23,6 +23,8 @@ apiVersion: batch/v1 kind: Job metadata: name: drydock-db-init + annotations: + {{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" }} spec: template: metadata: diff --git a/charts/drydock/templates/job-drydock-db-sync.yaml b/charts/drydock/templates/job-drydock-db-sync.yaml index dd8a0619..5c4aeb59 100644 --- a/charts/drydock/templates/job-drydock-db-sync.yaml +++ b/charts/drydock/templates/job-drydock-db-sync.yaml @@ -23,6 +23,8 @@ apiVersion: batch/v1 kind: Job metadata: name: drydock-db-sync + annotations: + {{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" }} spec: template: metadata: diff --git a/charts/drydock/templates/tests/test-drydock-api.yaml b/charts/drydock/templates/tests/test-drydock-api.yaml index e5fdfc26..7c3930e1 100644 --- a/charts/drydock/templates/tests/test-drydock-api.yaml +++ b/charts/drydock/templates/tests/test-drydock-api.yaml @@ -24,6 +24,7 @@ metadata: name: "{{ .Release.Name }}-api-test" annotations: "helm.sh/hook": "test-success" + {{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" }} labels: {{ tuple $envAll "drydock" "api-test" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }} spec: diff --git a/charts/drydock/templates/tests/test-drydock-auth.yaml b/charts/drydock/templates/tests/test-drydock-auth.yaml index 758f012e..15b6f6d5 100644 --- a/charts/drydock/templates/tests/test-drydock-auth.yaml +++ b/charts/drydock/templates/tests/test-drydock-auth.yaml @@ -25,6 +25,7 @@ metadata: name: "{{ .Release.Name }}-auth-test" annotations: helm.sh/hook: "test-failure" + {{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" }} labels: {{ tuple $envAll "drydock" "auth-test" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }} spec: diff --git a/tools/helm_tk.sh b/tools/helm_tk.sh index 9260734b..1a1a366b 100755 --- a/tools/helm_tk.sh +++ b/tools/helm_tk.sh @@ -18,7 +18,7 @@ HELM=$1 HTK_REPO=${HTK_REPO:-"https://github.com/openstack/openstack-helm-infra"} HTK_PATH=${HTK_PATH:-""} -HTK_STABLE_COMMIT=${HTK_COMMIT:-"274b230dcc8960af4fe44a871addcb5aacef3dba"} +HTK_STABLE_COMMIT=${HTK_COMMIT:-"2fce7e821201a5f578331370703e164d5a932fcc"} DEP_UP_LIST=${DEP_UP_LIST:-"drydock"} BUILD_DIR=${BUILD_DIR:-$(mktemp -d)}