From d239c701527931553c69b60755b073b4571f3ca1 Mon Sep 17 00:00:00 2001 From: Tin Lam Date: Tue, 26 May 2020 06:14:23 -0500 Subject: [PATCH] fix(yaml): correct bad annotations In a recent apparmor security patch [0], additional annotations were added to the cronjobs that were incorrectly indented. While helm v2 seems fairly tolerant and ignores these errors, running this usig helm v3 seems to cause rendering problems as we are placing incorrect key and value pair into the spec: field. This patch set corrects this. [0] https://review.opendev.org/#/c/725727/8 Change-Id: I9aae94bc0a68318b2c16fedbc973f7a0a2a3729e Signed-off-by: Tin Lam --- heat/templates/cron-job-engine-cleaner.yaml | 6 +++--- heat/templates/cron-job-purge-deleted.yaml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/heat/templates/cron-job-engine-cleaner.yaml b/heat/templates/cron-job-engine-cleaner.yaml index 036b0ac7ee..4630a42f9d 100644 --- a/heat/templates/cron-job-engine-cleaner.yaml +++ b/heat/templates/cron-job-engine-cleaner.yaml @@ -45,9 +45,9 @@ spec: labels: {{ tuple $envAll "heat" "engine-cleaner" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 12 }} annotations: -{{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" | 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" }} +{{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" | indent 12 }} + configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }} + configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} {{ dict "envAll" $envAll "podName" "heat-engine-cleaner" "containerNames" (list "heat-engine-cleaner" "init" ) | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 8 }} spec: serviceAccountName: {{ $serviceAccountName }} diff --git a/heat/templates/cron-job-purge-deleted.yaml b/heat/templates/cron-job-purge-deleted.yaml index c9f32f6254..0013a5ed74 100644 --- a/heat/templates/cron-job-purge-deleted.yaml +++ b/heat/templates/cron-job-purge-deleted.yaml @@ -42,7 +42,7 @@ spec: labels: {{ tuple $envAll "heat" "purge-deleted" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 12 }} annotations: -{{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" | indent 8 }} +{{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" | indent 12 }} {{ dict "envAll" $envAll "podName" "heat-purge-deleted" "containerNames" (list "init" "heat-purge-deleted" ) | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 8 }} spec: serviceAccountName: {{ $serviceAccountName }}