From 6b504ecd0f174d74f348a3f0a18c2b65c2081d91 Mon Sep 17 00:00:00 2001 From: Mohammed Naser Date: Thu, 23 Feb 2023 15:43:50 +0000 Subject: [PATCH] fix(cinder): add endpoint details for nova This change adds the endpoint details for Nova to allow for online resizes however a very key thing in this is that it is actually using the Cinder credentials to talk to Nova. OpenStack projects have historically arbitrarily decided to use the user credentials of the _target_ service rather than the source service which does not make sense, a mailing list discussion seemed to have not brought up any negatives but only positives. For the future, we can continue to do this which will simplify our endpoints section but this is a start. Change-Id: Ib9b500ef9a9bc34c8b64215bee57451494735573 --- cinder/Chart.yaml | 2 +- cinder/templates/configmap-etc.yaml | 23 +++++++++++++++++++++++ cinder/values.yaml | 4 ++++ releasenotes/notes/cinder.yaml | 1 + 4 files changed, 29 insertions(+), 1 deletion(-) diff --git a/cinder/Chart.yaml b/cinder/Chart.yaml index a5184e64bb..53708546cf 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.4 +version: 0.3.5 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/configmap-etc.yaml b/cinder/templates/configmap-etc.yaml index e5a7ce7160..5010ab9653 100644 --- a/cinder/templates/configmap-etc.yaml +++ b/cinder/templates/configmap-etc.yaml @@ -49,6 +49,29 @@ limitations under the License. {{- $_ := set .Values.conf.cinder.keystone_authtoken "memcache_secret_key" ( default ( randAlphaNum 64 ) .Values.endpoints.oslo_cache.auth.memcache_secret_key ) -}} {{- end -}} +{{- if empty $envAll.Values.conf.cinder.nova.auth_url -}} +{{- $_ := tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup"| set $envAll.Values.conf.cinder.nova "auth_url" -}} +{{- end }} + +{{- if empty $envAll.Values.conf.cinder.nova.region_name -}} +{{- $_ := set $envAll.Values.conf.cinder.nova "region_name" $envAll.Values.endpoints.identity.auth.cinder.region_name -}} +{{- end -}} +{{- if empty $envAll.Values.conf.cinder.nova.project_name -}} +{{- $_ := set $envAll.Values.conf.cinder.nova "project_name" $envAll.Values.endpoints.identity.auth.cinder.project_name -}} +{{- end -}} +{{- if empty $envAll.Values.conf.cinder.nova.project_domain_name -}} +{{- $_ := set $envAll.Values.conf.cinder.nova "project_domain_name" $envAll.Values.endpoints.identity.auth.cinder.project_domain_name -}} +{{- end -}} +{{- if empty $envAll.Values.conf.cinder.nova.user_domain_name -}} +{{- $_ := set $envAll.Values.conf.cinder.nova "user_domain_name" $envAll.Values.endpoints.identity.auth.cinder.user_domain_name -}} +{{- end -}} +{{- if empty $envAll.Values.conf.cinder.nova.username -}} +{{- $_ := set $envAll.Values.conf.cinder.nova "username" $envAll.Values.endpoints.identity.auth.cinder.username -}} +{{- end -}} +{{- if empty $envAll.Values.conf.cinder.nova.password -}} +{{- $_ := set $envAll.Values.conf.cinder.nova "password" $envAll.Values.endpoints.identity.auth.cinder.password -}} +{{- end -}} + {{- if empty .Values.conf.cinder.database.connection -}} {{- $connection := tuple "oslo_db" "internal" "cinder" "mysql" . | include "helm-toolkit.endpoints.authenticated_endpoint_uri_lookup" -}} {{- if .Values.manifests.certificates -}} diff --git a/cinder/values.yaml b/cinder/values.yaml index 15c11784e3..06412f5a77 100644 --- a/cinder/values.yaml +++ b/cinder/values.yaml @@ -826,6 +826,10 @@ conf: auth_version: v3 auth_type: password memcache_security_strategy: ENCRYPT + nova: + auth_type: password + auth_version: v3 + interface: internal oslo_policy: policy_file: /etc/cinder/policy.yaml oslo_concurrency: diff --git a/releasenotes/notes/cinder.yaml b/releasenotes/notes/cinder.yaml index a8739b42e1..6ca580fd4f 100644 --- a/releasenotes/notes/cinder.yaml +++ b/releasenotes/notes/cinder.yaml @@ -54,4 +54,5 @@ cinder: - 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 + - 0.3.5 Add Nova endpoint details to support online volume resize ...