From 4ed2a6fe533d5d03f0f00c3b8700bca77fb9af5b Mon Sep 17 00:00:00 2001 From: Gage Hugo Date: Fri, 23 Apr 2021 14:50:08 -0500 Subject: [PATCH] Remove hook-delete-policy default settings from HTK These hooks were added as part of a previous change, however tiller does not handle these correctly, and jobs get deleted without being recreated. This change removes the hook from default htk annotations. Change-Id: I2aa7bb241ebbb7b54c5dc9cf21cd5ba290b7e5fd --- helm-toolkit/Chart.yaml | 2 +- helm-toolkit/templates/manifests/_job-bootstrap.tpl | 1 - helm-toolkit/templates/manifests/_job-db-init-mysql.tpl | 1 - helm-toolkit/templates/manifests/_job-db-sync.tpl | 1 - helm-toolkit/templates/manifests/_job-ks-endpoints.tpl | 1 - helm-toolkit/templates/manifests/_job-ks-service.tpl | 1 - helm-toolkit/templates/manifests/_job-ks-user.yaml.tpl | 1 - helm-toolkit/templates/manifests/_job-rabbit-init.yaml.tpl | 1 - helm-toolkit/templates/manifests/_job-s3-bucket.yaml.tpl | 1 - releasenotes/notes/helm-toolkit.yaml | 1 + 10 files changed, 2 insertions(+), 9 deletions(-) diff --git a/helm-toolkit/Chart.yaml b/helm-toolkit/Chart.yaml index 5b4c7b6ed..db0e735ae 100644 --- a/helm-toolkit/Chart.yaml +++ b/helm-toolkit/Chart.yaml @@ -15,7 +15,7 @@ apiVersion: v1 appVersion: v1.0.0 description: OpenStack-Helm Helm-Toolkit name: helm-toolkit -version: 0.2.11 +version: 0.2.12 home: https://docs.openstack.org/openstack-helm icon: https://www.openstack.org/themes/openstack/images/project-mascots/OpenStack-Helm/OpenStack_Project_OpenStackHelm_vertical.png sources: diff --git a/helm-toolkit/templates/manifests/_job-bootstrap.tpl b/helm-toolkit/templates/manifests/_job-bootstrap.tpl index 63e76083e..6bd0898e2 100644 --- a/helm-toolkit/templates/manifests/_job-bootstrap.tpl +++ b/helm-toolkit/templates/manifests/_job-bootstrap.tpl @@ -45,7 +45,6 @@ kind: Job metadata: name: {{ printf "%s-%s" $serviceNamePretty "bootstrap" | quote }} annotations: - "helm.sh/hook-delete-policy": before-hook-creation {{- if $jobAnnotations }} {{ toYaml $jobAnnotations | indent 4 }} {{- end }} diff --git a/helm-toolkit/templates/manifests/_job-db-init-mysql.tpl b/helm-toolkit/templates/manifests/_job-db-init-mysql.tpl index d5751c829..446339737 100644 --- a/helm-toolkit/templates/manifests/_job-db-init-mysql.tpl +++ b/helm-toolkit/templates/manifests/_job-db-init-mysql.tpl @@ -46,7 +46,6 @@ kind: Job metadata: name: {{ printf "%s-%s" $serviceNamePretty "db-init" | quote }} annotations: - "helm.sh/hook-delete-policy": before-hook-creation {{- if $jobAnnotations }} {{ toYaml $jobAnnotations | indent 4 }} {{- end }} diff --git a/helm-toolkit/templates/manifests/_job-db-sync.tpl b/helm-toolkit/templates/manifests/_job-db-sync.tpl index 8e62f4269..979211d32 100644 --- a/helm-toolkit/templates/manifests/_job-db-sync.tpl +++ b/helm-toolkit/templates/manifests/_job-db-sync.tpl @@ -43,7 +43,6 @@ kind: Job metadata: name: {{ printf "%s-%s" $serviceNamePretty "db-sync" | quote }} annotations: - "helm.sh/hook-delete-policy": before-hook-creation {{- if $jobAnnotations }} {{ toYaml $jobAnnotations | indent 4 }} {{- end }} diff --git a/helm-toolkit/templates/manifests/_job-ks-endpoints.tpl b/helm-toolkit/templates/manifests/_job-ks-endpoints.tpl index c1641f4f9..6df37b6e2 100644 --- a/helm-toolkit/templates/manifests/_job-ks-endpoints.tpl +++ b/helm-toolkit/templates/manifests/_job-ks-endpoints.tpl @@ -46,7 +46,6 @@ kind: Job metadata: name: {{ printf "%s-%s" $serviceNamePretty "ks-endpoints" | quote }} annotations: - "helm.sh/hook-delete-policy": before-hook-creation {{- if $jobAnnotations }} {{ toYaml $jobAnnotations | indent 4 }} {{- end }} diff --git a/helm-toolkit/templates/manifests/_job-ks-service.tpl b/helm-toolkit/templates/manifests/_job-ks-service.tpl index 2ab5c443d..ca9f6c3e9 100644 --- a/helm-toolkit/templates/manifests/_job-ks-service.tpl +++ b/helm-toolkit/templates/manifests/_job-ks-service.tpl @@ -46,7 +46,6 @@ kind: Job metadata: name: {{ printf "%s-%s" $serviceNamePretty "ks-service" | quote }} annotations: - "helm.sh/hook-delete-policy": before-hook-creation {{- if $jobAnnotations }} {{ toYaml $jobAnnotations | indent 4 }} {{- end }} diff --git a/helm-toolkit/templates/manifests/_job-ks-user.yaml.tpl b/helm-toolkit/templates/manifests/_job-ks-user.yaml.tpl index 3f089a0d6..42f237039 100644 --- a/helm-toolkit/templates/manifests/_job-ks-user.yaml.tpl +++ b/helm-toolkit/templates/manifests/_job-ks-user.yaml.tpl @@ -46,7 +46,6 @@ kind: Job metadata: name: {{ printf "%s-%s" $serviceUserPretty "ks-user" | quote }} annotations: - "helm.sh/hook-delete-policy": before-hook-creation {{- if $jobAnnotations }} {{ toYaml $jobAnnotations | indent 4 }} {{- end }} diff --git a/helm-toolkit/templates/manifests/_job-rabbit-init.yaml.tpl b/helm-toolkit/templates/manifests/_job-rabbit-init.yaml.tpl index 3f2eb8994..558f9e4a3 100644 --- a/helm-toolkit/templates/manifests/_job-rabbit-init.yaml.tpl +++ b/helm-toolkit/templates/manifests/_job-rabbit-init.yaml.tpl @@ -33,7 +33,6 @@ kind: Job metadata: name: {{ printf "%s-%s" $serviceUserPretty "rabbit-init" | quote }} annotations: - "helm.sh/hook-delete-policy": before-hook-creation {{- if $jobAnnotations }} {{ toYaml $jobAnnotations | indent 4 }} {{- end }} diff --git a/helm-toolkit/templates/manifests/_job-s3-bucket.yaml.tpl b/helm-toolkit/templates/manifests/_job-s3-bucket.yaml.tpl index f859f053f..a70c6c1b4 100644 --- a/helm-toolkit/templates/manifests/_job-s3-bucket.yaml.tpl +++ b/helm-toolkit/templates/manifests/_job-s3-bucket.yaml.tpl @@ -41,7 +41,6 @@ metadata: name: {{ printf "%s-%s" $serviceNamePretty "s3-bucket" | quote }} annotations: {{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" }} - "helm.sh/hook-delete-policy": before-hook-creation {{- if $jobAnnotations }} {{ toYaml $jobAnnotations | indent 4 }} {{- end }} diff --git a/releasenotes/notes/helm-toolkit.yaml b/releasenotes/notes/helm-toolkit.yaml index 1103cf8b5..ab03ff5b8 100644 --- a/releasenotes/notes/helm-toolkit.yaml +++ b/releasenotes/notes/helm-toolkit.yaml @@ -18,4 +18,5 @@ helm-toolkit: - 0.2.9 Jobs; put labels only in the template spec - 0.2.10 Add more S3 configuration options - 0.2.11 Revert S3 User & Bucket job scripts to v0.2.9 + - 0.2.12 Remove hook-delete-policy ...