Rename Keystone Endpoint type functions

This commit is contained in:
Pete Birley 2017-03-02 02:11:59 +00:00
parent ff0d8ca267
commit fe7a1cf62d
7 changed files with 14 additions and 14 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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