From a0bb05f41e13c7f7ebfbd2bcf81d315a98d9e6bb Mon Sep 17 00:00:00 2001 From: Mohammed Naser Date: Tue, 31 Jan 2023 17:26:33 -0500 Subject: [PATCH] fix: add hooks for cinder bootstrap jobs Change-Id: Ib457934ff539e4c7e19690a696415394634766d0 --- cinder/Chart.yaml | 2 +- cinder/templates/job-backup-storage-init.yaml | 4 ++++ cinder/templates/job-storage-init.yaml | 5 +++++ releasenotes/notes/cinder.yaml | 1 + 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/cinder/Chart.yaml b/cinder/Chart.yaml index 5a208ffd9d..a5184e64bb 100644 --- a/cinder/Chart.yaml +++ b/cinder/Chart.yaml @@ -14,7 +14,7 @@ apiVersion: v1 appVersion: v1.0.0 description: OpenStack-Helm Cinder name: cinder -version: 0.3.3 +version: 0.3.4 home: https://docs.openstack.org/cinder/latest/ icon: https://www.openstack.org/themes/openstack/images/project-mascots/Cinder/OpenStack_Project_Cinder_vertical.png sources: diff --git a/cinder/templates/job-backup-storage-init.yaml b/cinder/templates/job-backup-storage-init.yaml index 8168b90f53..62db734bc3 100644 --- a/cinder/templates/job-backup-storage-init.yaml +++ b/cinder/templates/job-backup-storage-init.yaml @@ -53,6 +53,10 @@ metadata: labels: {{ tuple $envAll "cinder" "backup-storage-init" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }} annotations: +{{- if .Values.helm3_hook }} + "helm.sh/hook": post-install,post-upgrade + "helm.sh/hook-delete-policy": before-hook-creation +{{- end }} {{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" }} spec: template: diff --git a/cinder/templates/job-storage-init.yaml b/cinder/templates/job-storage-init.yaml index 0f06c221e0..e28a35efb9 100755 --- a/cinder/templates/job-storage-init.yaml +++ b/cinder/templates/job-storage-init.yaml @@ -54,6 +54,11 @@ metadata: name: cinder-storage-init labels: {{ tuple $envAll "cinder" "storage-init" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }} + annotations: +{{- if .Values.helm3_hook }} + "helm.sh/hook": post-install,post-upgrade + "helm.sh/hook-delete-policy": before-hook-creation +{{- end }} spec: template: metadata: diff --git a/releasenotes/notes/cinder.yaml b/releasenotes/notes/cinder.yaml index 0d6f13de7d..a8739b42e1 100644 --- a/releasenotes/notes/cinder.yaml +++ b/releasenotes/notes/cinder.yaml @@ -53,4 +53,5 @@ cinder: - 0.3.1 Change ceph-config-helper image tag - 0.3.2 Remove default policy rules - 0.3.3 Fix for creation endpoins and services when v1/v2 are disabled + - 0.3.4 Fix Helm hooks for storage bootstrap jobs ...