From 3e63be0682fc1f6cf436395c06c34707bb95688d Mon Sep 17 00:00:00 2001 From: Phil Sphicas Date: Wed, 4 May 2022 09:57:02 -0700 Subject: [PATCH] Allow cinder v1/v2 endpoint creation if needed An earlier change [0] removed the older cinder v1 and v2 endpoint definitions from values.yaml. If older APIs are required, they can be enabled using overrides, but the ks-service job only creates a volumev3 endpoint. This change updates the ks-service job to create all endpoints defined in .Values.endpoints that have "volume" in their name. Note that several settings are hardcoded to use volumev3, so this change would mostly useful in enabling v2 in addition to v3. 0: https://review.opendev.org/c/openstack/openstack-helm/+/817310 Change-Id: I26594668ff26ed3f28e207f341b28a139b514e1c --- cinder/Chart.yaml | 2 +- cinder/templates/job-ks-service.yaml | 8 +++++++- releasenotes/notes/cinder.yaml | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/cinder/Chart.yaml b/cinder/Chart.yaml index 671470f199..b3e17da8b0 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.19 +version: 0.2.20 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-ks-service.yaml b/cinder/templates/job-ks-service.yaml index 3cd59f3558..329950641b 100644 --- a/cinder/templates/job-ks-service.yaml +++ b/cinder/templates/job-ks-service.yaml @@ -18,7 +18,13 @@ helm.sh/hook-weight: "-3" {{- end }} {{- if .Values.manifests.job_ks_service }} -{{- $ksServiceJob := dict "envAll" . "serviceName" "cinder" "serviceTypes" ( tuple "volumev3" ) -}} +{{- $serviceTypes := list }} +{{- range $_, $v := keys .Values.endpoints | sortAlpha }} +{{- if $v | hasPrefix "volume" }} +{{- $serviceTypes = append $serviceTypes $v }} +{{- end }} +{{- end }} +{{- $ksServiceJob := dict "envAll" . "serviceName" "cinder" "serviceTypes" $serviceTypes -}} {{- if .Values.manifests.certificates -}} {{- $_ := set $ksServiceJob "tlsSecret" .Values.secrets.tls.volumev3.api.internal -}} {{- end -}} diff --git a/releasenotes/notes/cinder.yaml b/releasenotes/notes/cinder.yaml index d6d986c195..e4b2a31bd6 100644 --- a/releasenotes/notes/cinder.yaml +++ b/releasenotes/notes/cinder.yaml @@ -36,4 +36,5 @@ cinder: - 0.2.17 Remove unsupported values overrides - 0.2.18 Add helm hook in bootstrap job - 0.2.19 Add volume types visibility (public/private) + - 0.2.20 Allow cinder v1/v2 endpoint creation if needed ...