config/kubernetes/applications/stx-openstack/stx-openstack-helm/stx-openstack-helm/fm-rest-api/templates/configmap-etc.yaml

47 lines
2.4 KiB
YAML
Executable File

{{/*
#
# SPDX-License-Identifier: Apache-2.0
#
*/}}
{{- if empty .Values.conf.fm.database.connection -}}
{{- $_ := tuple "oslo_db" "internal" "fm" "mysql" . | include "helm-toolkit.endpoints.authenticated_endpoint_uri_lookup"| set .Values.conf.fm.database "connection" -}}
{{- end -}}
{{- if empty .Values.conf.fm.DEFAULT.sql_connection -}}
{{- $_ := tuple "oslo_db" "internal" "fm" "mysql" . | include "helm-toolkit.endpoints.authenticated_endpoint_uri_lookup"| set .Values.conf.fm.DEFAULT "sql_connection" -}}
{{- end -}}
{{- if empty .Values.conf.fm.keystone_authtoken.auth_uri -}}
{{- $_ := tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup"| set .Values.conf.fm.keystone_authtoken "auth_uri" -}}
{{- end -}}
{{- if empty .Values.conf.fm.keystone_authtoken.auth_url -}}
{{- $_ := tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup"| set .Values.conf.fm.keystone_authtoken "auth_url" -}}
{{- end -}}
{{- if empty .Values.conf.fm.keystone_authtoken.region_name -}}
{{- $_ := set .Values.conf.fm.keystone_authtoken "region_name" .Values.endpoints.identity.auth.fm.region_name -}}
{{- end -}}
{{- if empty .Values.conf.fm.keystone_authtoken.project_name -}}
{{- $_ := set .Values.conf.fm.keystone_authtoken "project_name" .Values.endpoints.identity.auth.fm.project_name -}}
{{- end -}}
{{- if empty .Values.conf.fm.keystone_authtoken.project_domain_name -}}
{{- $_ := set .Values.conf.fm.keystone_authtoken "project_domain_name" .Values.endpoints.identity.auth.fm.project_domain_name -}}
{{- end -}}
{{- if empty .Values.conf.fm.keystone_authtoken.user_domain_name -}}
{{- $_ := set .Values.conf.fm.keystone_authtoken "user_domain_name" .Values.endpoints.identity.auth.fm.user_domain_name -}}
{{- end -}}
{{- if empty .Values.conf.fm.keystone_authtoken.username -}}
{{- $_ := set .Values.conf.fm.keystone_authtoken "username" .Values.endpoints.identity.auth.fm.username -}}
{{- end -}}
{{- if empty .Values.conf.fm.keystone_authtoken.password -}}
{{- $_ := set .Values.conf.fm.keystone_authtoken "password" .Values.endpoints.identity.auth.fm.password -}}
{{- end -}}
apiVersion: v1
kind: Secret
metadata:
name: fm-etc
type: Opaque
data:
api-paste.ini: {{ include "helm-toolkit.utils.to_ini" .Values.conf.paste | b64enc }}
fm.conf: {{ include "helm-toolkit.utils.to_oslo_conf" .Values.conf.fm | b64enc }}
logging.conf: {{ include "helm-toolkit.utils.to_oslo_conf" .Values.conf.logging | b64enc }}