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
This commit is contained in:
Phil Sphicas 2022-05-04 09:57:02 -07:00
parent 6125f6e3b8
commit 3e63be0682
3 changed files with 9 additions and 2 deletions

View File

@ -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:

View File

@ -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 -}}

View File

@ -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
...