From 9d7bd6914771dadc840eca9e77739177c47869df Mon Sep 17 00:00:00 2001 From: josebb Date: Fri, 10 Dec 2021 12:16:19 +0200 Subject: [PATCH] Add helm hook in cinder bootstrap job Change-Id: I3a556d6deb57dc1b4c374fa997b0d37c22f1b066 --- cinder/Chart.yaml | 2 +- cinder/templates/job-bootstrap.yaml | 7 ++++++- releasenotes/notes/cinder.yaml | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/cinder/Chart.yaml b/cinder/Chart.yaml index 1b49c5b7fd..c5a2abf8b8 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.2.17 +version: 0.2.18 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-bootstrap.yaml b/cinder/templates/job-bootstrap.yaml index 8af3b7e6c7..0db54091f7 100644 --- a/cinder/templates/job-bootstrap.yaml +++ b/cinder/templates/job-bootstrap.yaml @@ -12,8 +12,13 @@ See the License for the specific language governing permissions and limitations under the License. */}} +{{- define "metadata.annotations.job.bootstrap" }} +helm.sh/hook: post-install,post-upgrade +helm.sh/hook-weight: "5" +{{- end }} + {{- if and .Values.manifests.job_bootstrap .Values.bootstrap.enabled }} -{{- $bootstrapJob := dict "envAll" . "serviceName" "cinder" "keystoneUser" .Values.bootstrap.ks_user "logConfigFile" .Values.conf.cinder.DEFAULT.log_config_append -}} +{{- $bootstrapJob := dict "envAll" . "serviceName" "cinder" "keystoneUser" .Values.bootstrap.ks_user "logConfigFile" .Values.conf.cinder.DEFAULT.log_config_append "jobAnnotations" (include "metadata.annotations.job.bootstrap" . | fromYaml) -}} {{- if .Values.manifests.certificates -}} {{- $_ := set $bootstrapJob "tlsSecret" .Values.secrets.tls.volumev3.api.internal -}} {{- end -}} diff --git a/releasenotes/notes/cinder.yaml b/releasenotes/notes/cinder.yaml index 1a91e2b25e..dae8c0722b 100644 --- a/releasenotes/notes/cinder.yaml +++ b/releasenotes/notes/cinder.yaml @@ -34,4 +34,5 @@ cinder: - 0.2.15 Remove glance registry - 0.2.16 Enable taint toleration for Openstack services - 0.2.17 Remove unsupported values overrides + - 0.2.18 Add helm hook in bootstrap job ...