diff --git a/cinder/templates/etc/_cinder.conf.tpl b/cinder/templates/etc/_cinder.conf.tpl index cc42466ec2..cb336d6485 100644 --- a/cinder/templates/etc/_cinder.conf.tpl +++ b/cinder/templates/etc/_cinder.conf.tpl @@ -26,7 +26,7 @@ osapi_volume_listen_port = {{ .Values.network.port.api }} api_paste_config = /etc/cinder/api-paste.ini -glance_api_servers = {{ tuple "image" "internal" "api" . | include "helm-toolkit.endpoint_type_lookup_addr" }} +glance_api_servers = {{ tuple "image" "internal" "api" . | include "helm-toolkit.keystone_endpoint_uri_lookup" }} glance_api_version = {{ .Values.glance.version }} enabled_backends = {{ include "helm-toolkit.joinListWithComma" .Values.backends.enabled }} @@ -45,7 +45,7 @@ max_retries = -1 [keystone_authtoken] auth_version = v3 -auth_url = {{ tuple "identity" "internal" "api" . | include "helm-toolkit.endpoint_type_lookup_addr" }} +auth_url = {{ tuple "identity" "internal" "api" . | include "helm-toolkit.keystone_endpoint_uri_lookup" }} auth_type = password region_name = {{ .Values.keystone.cinder_region_name }} project_domain_name = {{ .Values.keystone.cinder_project_domain }} diff --git a/cinder/templates/job-ks-endpoints.yaml b/cinder/templates/job-ks-endpoints.yaml index f8e21622b5..b554fb1b7f 100644 --- a/cinder/templates/job-ks-endpoints.yaml +++ b/cinder/templates/job-ks-endpoints.yaml @@ -60,11 +60,11 @@ spec: - name: OS_SVC_ENDPOINT value: {{ $osServiceEndPoint }} - name: OS_SERVICE_NAME - value: {{ tuple $osServiceType $envAll | include "helm-toolkit.endpoint_name_lookup" }} + value: {{ tuple $osServiceType $envAll | include "helm-toolkit.keystone_endpoint_name_lookup" }} - name: OS_SERVICE_TYPE value: {{ $osServiceType }} - name: OS_SERVICE_ENDPOINT - value: {{ tuple $osServiceType $osServiceEndPoint "api" $envAll | include "helm-toolkit.endpoint_type_lookup_addr" }} + value: {{ tuple $osServiceType $osServiceEndPoint "api" $envAll | include "helm-toolkit.keystone_endpoint_uri_lookup" }} {{- end }} {{- end }} volumes: diff --git a/cinder/templates/job-ks-service.yaml b/cinder/templates/job-ks-service.yaml index 1e17be59eb..77c4257299 100644 --- a/cinder/templates/job-ks-service.yaml +++ b/cinder/templates/job-ks-service.yaml @@ -57,7 +57,7 @@ spec: {{- include "helm-toolkit.keystone_openrc_env_vars" $env | indent 12 }} {{- end }} - name: OS_SERVICE_NAME - value: {{ tuple $osServiceType $envAll | include "helm-toolkit.endpoint_name_lookup" }} + value: {{ tuple $osServiceType $envAll | include "helm-toolkit.keystone_endpoint_name_lookup" }} - name: OS_SERVICE_TYPE value: {{ $osServiceType }} {{- end }} diff --git a/cinder/templates/secret-keystone-admin.env.yaml b/cinder/templates/secret-keystone-admin.env.yaml index 2bb76c347c..5badd3e38c 100644 --- a/cinder/templates/secret-keystone-admin.env.yaml +++ b/cinder/templates/secret-keystone-admin.env.yaml @@ -19,7 +19,7 @@ metadata: type: Opaque data: OS_AUTH_URL: | -{{ tuple "identity" "admin" "admin" . | include "helm-toolkit.endpoint_type_lookup_addr" | b64enc | indent 4 }} +{{ tuple "identity" "admin" "admin" . | include "helm-toolkit.keystone_endpoint_uri_lookup" | b64enc | indent 4 }} OS_REGION_NAME: | {{ .Values.keystone.admin_region_name | b64enc | indent 4 }} OS_PROJECT_DOMAIN_NAME: | diff --git a/cinder/templates/secret-keystone-user.env.yaml b/cinder/templates/secret-keystone-user.env.yaml index ffaeca04a9..610df50108 100644 --- a/cinder/templates/secret-keystone-user.env.yaml +++ b/cinder/templates/secret-keystone-user.env.yaml @@ -19,7 +19,7 @@ metadata: type: Opaque data: OS_AUTH_URL: | -{{ tuple "identity" "internal" "api" . | include "helm-toolkit.endpoint_type_lookup_addr" | b64enc | indent 4 }} +{{ tuple "identity" "internal" "api" . | include "helm-toolkit.keystone_endpoint_uri_lookup" | b64enc | indent 4 }} OS_REGION_NAME: | {{ .Values.keystone.cinder_region_name | b64enc | indent 4 }} OS_PROJECT_DOMAIN_NAME: | diff --git a/helm-toolkit/templates/_endpoints.tpl b/helm-toolkit/templates/_endpoints.tpl index dcc4f2bdf9..6e26c5c9c2 100644 --- a/helm-toolkit/templates/_endpoints.tpl +++ b/helm-toolkit/templates/_endpoints.tpl @@ -128,10 +128,10 @@ # this function returns the endpoint uri for a service, it takes an tuple # input in the form: service-type, endpoint-class, port-name. eg: -# { tuple "orchestration" "public" "api" . | include "helm-toolkit.endpoint_type_lookup_addr" } +# { tuple "orchestration" "public" "api" . | include "helm-toolkit.keystone_endpoint_uri_lookup" } # will return the appropriate URI. Once merged this should phase out the above. -{{- define "helm-toolkit.endpoint_type_lookup_addr" -}} +{{- define "helm-toolkit.keystone_endpoint_uri_lookup" -}} {{- $type := index . 0 -}} {{- $endpoint := index . 1 -}} {{- $port := index . 2 -}} @@ -178,7 +178,7 @@ # { tuple orchestration . | include "ks_endpoint_type" } # will return "heat" -{{- define "helm-toolkit.endpoint_name_lookup" -}} +{{- define "helm-toolkit.keystone_endpoint_name_lookup" -}} {{- $type := index . 0 -}} {{- $context := index . 1 -}} {{- $endpointMap := index $context.Values.endpoints $type }} @@ -189,4 +189,4 @@ #------------------------------- # kolla helpers #------------------------------- -{{ define "helm-toolkit.keystone_auth" }}{'auth_url':'{{ tuple "identity" "internal" "api" . | include "helm-toolkit.endpoint_type_lookup_addr" }}', 'username':'{{ .Values.keystone.admin_user }}','password':'{{ .Values.keystone.admin_password }}','project_name':'{{ .Values.keystone.admin_project_name }}','domain_name':'default'}{{end}} +{{ define "helm-toolkit.keystone_auth" }}{'auth_url':'{{ tuple "identity" "internal" "api" . | include "helm-toolkit.keystone_endpoint_uri_lookup" }}', 'username':'{{ .Values.keystone.admin_user }}','password':'{{ .Values.keystone.admin_password }}','project_name':'{{ .Values.keystone.admin_project_name }}','domain_name':'default'}{{end}} diff --git a/keystone/templates/bin/_db-sync.sh.tpl b/keystone/templates/bin/_db-sync.sh.tpl index b084669166..40ccbd8116 100644 --- a/keystone/templates/bin/_db-sync.sh.tpl +++ b/keystone/templates/bin/_db-sync.sh.tpl @@ -22,7 +22,7 @@ keystone-manage --config-file=/etc/keystone/keystone.conf bootstrap \ --bootstrap-username {{ .Values.keystone.admin_user }} \ --bootstrap-password {{ .Values.keystone.admin_password }} \ --bootstrap-project-name {{ .Values.keystone.admin_project_name }} \ - --bootstrap-admin-url {{ tuple "identity" "admin" "admin" . | include "helm-toolkit.endpoint_type_lookup_addr" }} \ - --bootstrap-public-url {{ tuple "identity" "public" "api" . | include "helm-toolkit.endpoint_type_lookup_addr" }} \ - --bootstrap-internal-url {{ tuple "identity" "internal" "api" . | include "helm-toolkit.endpoint_type_lookup_addr" }} \ + --bootstrap-admin-url {{ tuple "identity" "admin" "admin" . | include "helm-toolkit.keystone_endpoint_uri_lookup" }} \ + --bootstrap-public-url {{ tuple "identity" "public" "api" . | include "helm-toolkit.keystone_endpoint_uri_lookup" }} \ + --bootstrap-internal-url {{ tuple "identity" "internal" "api" . | include "helm-toolkit.keystone_endpoint_uri_lookup" }} \ --bootstrap-region-id {{ .Values.keystone.admin_region_name }}