1c85fdc390
This PS allows a cache secret key for all instances of keystone middleware to be defined in a single location. Change-Id: I3d5c78732d8a8bb9110117130f0d886fea609526 Partial-Bug: 1753251
216 lines
12 KiB
YAML
216 lines
12 KiB
YAML
{{/*
|
|
Copyright 2017 The Openstack-Helm Authors.
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
*/}}
|
|
|
|
{{- if .Values.manifests.configmap_etc }}
|
|
{{- $envAll := . }}
|
|
|
|
{{- if empty .Values.conf.ironic.keystone_authtoken.auth_uri -}}
|
|
{{- tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup"| set .Values.conf.ironic.keystone_authtoken "auth_uri" | quote | trunc 0 -}}
|
|
{{- end -}}
|
|
{{- if empty .Values.conf.ironic.keystone_authtoken.auth_url -}}
|
|
{{- tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup"| set .Values.conf.ironic.keystone_authtoken "auth_url" | quote | trunc 0 -}}
|
|
{{- end -}}
|
|
{{- if empty .Values.conf.ironic.keystone_authtoken.region_name -}}
|
|
{{- set .Values.conf.ironic.keystone_authtoken "region_name" .Values.endpoints.identity.auth.ironic.region_name | quote | trunc 0 -}}
|
|
{{- end -}}
|
|
{{- if empty .Values.conf.ironic.keystone_authtoken.project_name -}}
|
|
{{- set .Values.conf.ironic.keystone_authtoken "project_name" .Values.endpoints.identity.auth.ironic.project_name | quote | trunc 0 -}}
|
|
{{- end -}}
|
|
{{- if empty .Values.conf.ironic.keystone_authtoken.project_domain_name -}}
|
|
{{- set .Values.conf.ironic.keystone_authtoken "project_domain_name" .Values.endpoints.identity.auth.ironic.project_domain_name | quote | trunc 0 -}}
|
|
{{- end -}}
|
|
{{- if empty .Values.conf.ironic.keystone_authtoken.user_domain_name -}}
|
|
{{- set .Values.conf.ironic.keystone_authtoken "user_domain_name" .Values.endpoints.identity.auth.ironic.user_domain_name | quote | trunc 0 -}}
|
|
{{- end -}}
|
|
{{- if empty .Values.conf.ironic.keystone_authtoken.username -}}
|
|
{{- set .Values.conf.ironic.keystone_authtoken "username" .Values.endpoints.identity.auth.ironic.username | quote | trunc 0 -}}
|
|
{{- end -}}
|
|
{{- if empty .Values.conf.ironic.keystone_authtoken.password -}}
|
|
{{- set .Values.conf.ironic.keystone_authtoken "password" .Values.endpoints.identity.auth.ironic.password | quote | trunc 0 -}}
|
|
{{- end -}}
|
|
|
|
{{- if empty .Values.conf.ironic.keystone_authtoken.memcached_servers -}}
|
|
{{- tuple "oslo_cache" "internal" "memcache" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" | set .Values.conf.ironic.keystone_authtoken "memcached_servers" | quote | trunc 0 -}}
|
|
{{- end -}}
|
|
{{- if empty .Values.conf.ironic.keystone_authtoken.memcache_secret_key -}}
|
|
{{- set .Values.conf.ironic.keystone_authtoken "memcache_secret_key" ( default ( randAlphaNum 64 ) .Values.endpoints.oslo_cache.auth.memcache_secret_key ) | quote | trunc 0 -}}
|
|
{{- end -}}
|
|
|
|
{{- if empty .Values.conf.ironic.database.connection -}}
|
|
{{- tuple "oslo_db" "internal" "ironic" "mysql" . | include "helm-toolkit.endpoints.authenticated_endpoint_uri_lookup"| set .Values.conf.ironic.database "connection" | quote | trunc 0 -}}
|
|
{{- end -}}
|
|
|
|
{{- if empty .Values.conf.ironic.DEFAULT.transport_url -}}
|
|
{{- tuple "oslo_messaging" "internal" "ironic" "amqp" . | include "helm-toolkit.endpoints.authenticated_endpoint_uri_lookup" | set .Values.conf.ironic.DEFAULT "transport_url" | quote | trunc 0 -}}
|
|
{{- end -}}
|
|
|
|
{{- if empty .Values.conf.ironic.glance.glance_host -}}
|
|
{{- tuple "image" "internal" . | include "helm-toolkit.endpoints.hostname_fqdn_endpoint_lookup"| set .Values.conf.ironic.glance "glance_host" | quote | trunc 0 -}}
|
|
{{- end -}}
|
|
{{- if empty .Values.conf.ironic.glance.glance_port -}}
|
|
{{- tuple "image" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup"| set .Values.conf.ironic.glance "glance_port" | quote | trunc 0 -}}
|
|
{{- end -}}
|
|
|
|
{{- if empty .Values.conf.ironic.glance.auth_url -}}
|
|
{{- tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup"| set .Values.conf.ironic.glance "auth_url" | quote | trunc 0 -}}
|
|
{{- end -}}
|
|
{{- if empty .Values.conf.ironic.glance.project_name -}}
|
|
{{- set .Values.conf.ironic.glance "project_name" .Values.endpoints.identity.auth.ironic.project_name | quote | trunc 0 -}}
|
|
{{- end -}}
|
|
{{- if empty .Values.conf.ironic.glance.project_domain_name -}}
|
|
{{- set .Values.conf.ironic.glance "project_domain_name" .Values.endpoints.identity.auth.ironic.project_domain_name | quote | trunc 0 -}}
|
|
{{- end -}}
|
|
{{- if empty .Values.conf.ironic.glance.user_domain_name -}}
|
|
{{- set .Values.conf.ironic.glance "user_domain_name" .Values.endpoints.identity.auth.ironic.user_domain_name | quote | trunc 0 -}}
|
|
{{- end -}}
|
|
{{- if empty .Values.conf.ironic.glance.username -}}
|
|
{{- set .Values.conf.ironic.glance "username" .Values.endpoints.identity.auth.ironic.username | quote | trunc 0 -}}
|
|
{{- end -}}
|
|
{{- if empty .Values.conf.ironic.glance.password -}}
|
|
{{- set .Values.conf.ironic.glance "password" .Values.endpoints.identity.auth.ironic.password | quote | trunc 0 -}}
|
|
{{- end -}}
|
|
|
|
|
|
{{- if empty .Values.conf.ironic.inspector.auth_url -}}
|
|
{{- tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup"| set .Values.conf.ironic.inspector "auth_url" | quote | trunc 0 -}}
|
|
{{- end -}}
|
|
{{- if empty .Values.conf.ironic.inspector.project_name -}}
|
|
{{- set .Values.conf.ironic.inspector "project_name" .Values.endpoints.identity.auth.ironic.project_name | quote | trunc 0 -}}
|
|
{{- end -}}
|
|
{{- if empty .Values.conf.ironic.inspector.project_domain_name -}}
|
|
{{- set .Values.conf.ironic.inspector "project_domain_name" .Values.endpoints.identity.auth.ironic.project_domain_name | quote | trunc 0 -}}
|
|
{{- end -}}
|
|
{{- if empty .Values.conf.ironic.inspector.user_domain_name -}}
|
|
{{- set .Values.conf.ironic.inspector "user_domain_name" .Values.endpoints.identity.auth.ironic.user_domain_name | quote | trunc 0 -}}
|
|
{{- end -}}
|
|
{{- if empty .Values.conf.ironic.inspector.username -}}
|
|
{{- set .Values.conf.ironic.inspector "username" .Values.endpoints.identity.auth.ironic.username | quote | trunc 0 -}}
|
|
{{- end -}}
|
|
{{- if empty .Values.conf.ironic.inspector.password -}}
|
|
{{- set .Values.conf.ironic.inspector "password" .Values.endpoints.identity.auth.ironic.password | quote | trunc 0 -}}
|
|
{{- end -}}
|
|
|
|
|
|
{{- if empty .Values.conf.ironic.neutron.url -}}
|
|
{{- tuple "network" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup"| set .Values.conf.ironic.neutron "url" | quote | trunc 0 -}}
|
|
{{- end -}}
|
|
{{- if empty .Values.conf.ironic.neutron.auth_url -}}
|
|
{{- tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup"| set .Values.conf.ironic.neutron "auth_url" | quote | trunc 0 -}}
|
|
{{- end -}}
|
|
{{- if empty .Values.conf.ironic.neutron.project_name -}}
|
|
{{- set .Values.conf.ironic.neutron "project_name" .Values.endpoints.identity.auth.ironic.project_name | quote | trunc 0 -}}
|
|
{{- end -}}
|
|
{{- if empty .Values.conf.ironic.neutron.project_domain_name -}}
|
|
{{- set .Values.conf.ironic.neutron "project_domain_name" .Values.endpoints.identity.auth.ironic.project_domain_name | quote | trunc 0 -}}
|
|
{{- end -}}
|
|
{{- if empty .Values.conf.ironic.neutron.user_domain_name -}}
|
|
{{- set .Values.conf.ironic.neutron "user_domain_name" .Values.endpoints.identity.auth.ironic.user_domain_name | quote | trunc 0 -}}
|
|
{{- end -}}
|
|
{{- if empty .Values.conf.ironic.neutron.username -}}
|
|
{{- set .Values.conf.ironic.neutron "username" .Values.endpoints.identity.auth.ironic.username | quote | trunc 0 -}}
|
|
{{- end -}}
|
|
{{- if empty .Values.conf.ironic.neutron.password -}}
|
|
{{- set .Values.conf.ironic.neutron "password" .Values.endpoints.identity.auth.ironic.password | quote | trunc 0 -}}
|
|
{{- end -}}
|
|
|
|
{{- if empty .Values.conf.ironic.service_catalog.auth_url -}}
|
|
{{- tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup"| set .Values.conf.ironic.service_catalog "auth_url" | quote | trunc 0 -}}
|
|
{{- end -}}
|
|
{{- if empty .Values.conf.ironic.service_catalog.project_name -}}
|
|
{{- set .Values.conf.ironic.service_catalog "project_name" .Values.endpoints.identity.auth.ironic.project_name | quote | trunc 0 -}}
|
|
{{- end -}}
|
|
{{- if empty .Values.conf.ironic.service_catalog.project_domain_name -}}
|
|
{{- set .Values.conf.ironic.service_catalog "project_domain_name" .Values.endpoints.identity.auth.ironic.project_domain_name | quote | trunc 0 -}}
|
|
{{- end -}}
|
|
{{- if empty .Values.conf.ironic.service_catalog.user_domain_name -}}
|
|
{{- set .Values.conf.ironic.service_catalog "user_domain_name" .Values.endpoints.identity.auth.ironic.user_domain_name | quote | trunc 0 -}}
|
|
{{- end -}}
|
|
{{- if empty .Values.conf.ironic.service_catalog.username -}}
|
|
{{- set .Values.conf.ironic.service_catalog "username" .Values.endpoints.identity.auth.ironic.username | quote | trunc 0 -}}
|
|
{{- end -}}
|
|
{{- if empty .Values.conf.ironic.service_catalog.password -}}
|
|
{{- set .Values.conf.ironic.service_catalog "password" .Values.endpoints.identity.auth.ironic.password | quote | trunc 0 -}}
|
|
{{- end -}}
|
|
|
|
{{- if empty .Values.conf.ironic.swift.auth_url -}}
|
|
{{- tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup"| set .Values.conf.ironic.swift "auth_url" | quote | trunc 0 -}}
|
|
{{- end -}}
|
|
{{- if empty .Values.conf.ironic.swift.project_name -}}
|
|
{{- set .Values.conf.ironic.swift "project_name" .Values.endpoints.identity.auth.ironic.project_name | quote | trunc 0 -}}
|
|
{{- end -}}
|
|
{{- if empty .Values.conf.ironic.swift.project_domain_name -}}
|
|
{{- set .Values.conf.ironic.swift "project_domain_name" .Values.endpoints.identity.auth.ironic.project_domain_name | quote | trunc 0 -}}
|
|
{{- end -}}
|
|
{{- if empty .Values.conf.ironic.swift.user_domain_name -}}
|
|
{{- set .Values.conf.ironic.swift "user_domain_name" .Values.endpoints.identity.auth.ironic.user_domain_name | quote | trunc 0 -}}
|
|
{{- end -}}
|
|
{{- if empty .Values.conf.ironic.swift.username -}}
|
|
{{- set .Values.conf.ironic.swift "username" .Values.endpoints.identity.auth.ironic.username | quote | trunc 0 -}}
|
|
{{- end -}}
|
|
{{- if empty .Values.conf.ironic.swift.password -}}
|
|
{{- set .Values.conf.ironic.swift "password" .Values.endpoints.identity.auth.ironic.password | quote | trunc 0 -}}
|
|
{{- end -}}
|
|
|
|
{{- if empty .Values.conf.ironic.conductor.api_url -}}
|
|
{{- tuple "baremetal" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup"| set .Values.conf.ironic.conductor "api_url" | quote | trunc 0 -}}
|
|
{{- end -}}
|
|
|
|
{{- if empty .Values.conf.ironic.api.public_endpoint -}}
|
|
{{- tuple "baremetal" "public" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup"| set .Values.conf.ironic.api "public_endpoint" | quote | trunc 0 -}}
|
|
{{- end -}}
|
|
|
|
{{- if empty .Values.conf.ironic.glance.swift_endpoint_url -}}
|
|
{{- tuple "ceph_object_store" "public" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup"| trimSuffix .Values.endpoints.ceph_object_store.path.default | set .Values.conf.ironic.glance "swift_endpoint_url" | quote | trunc 0 -}}
|
|
{{- end -}}
|
|
|
|
{{- if empty .Values.conf.ironic.glance.swift_temp_url_key -}}
|
|
{{- set .Values.conf.ironic.glance "swift_temp_url_key" .Values.endpoints.ceph_object_store.auth.glance.tmpurlkey | quote | trunc 0 -}}
|
|
{{- end -}}
|
|
|
|
{{- if empty .Values.conf.ironic.api.port -}}
|
|
{{- set .Values.conf.ironic.api "port" (tuple "baremetal" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup") | quote | trunc 0 -}}
|
|
{{- end -}}
|
|
|
|
---
|
|
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: ironic-etc
|
|
data:
|
|
ironic.conf: |
|
|
{{ include "helm-toolkit.utils.to_oslo_conf" .Values.conf.ironic | indent 4 }}
|
|
policy.json: |
|
|
{{ toJson .Values.conf.policy | indent 4 }}
|
|
tftp-map-file: |
|
|
{{ if .Values.conf.tftp_map_file.override -}}
|
|
{{ .Values.conf.tftp_map_file.override | indent 4 }}
|
|
{{- else -}}
|
|
{{ tuple "etc/_tftp-map-file.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
|
{{- end }}
|
|
{{- if .Values.conf.tftp_map_file.append -}}
|
|
{{ .Values.conf.tftp_map_file.append | indent 4 }}
|
|
{{- end }}
|
|
nginx.conf: |
|
|
{{ if .Values.conf.nginx.override -}}
|
|
{{ .Values.conf.nginx.override | indent 4 }}
|
|
{{- else -}}
|
|
{{ tuple "etc/_nginx.conf.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
|
{{- end }}
|
|
{{- if .Values.conf.nginx.append -}}
|
|
{{ .Values.conf.nginx.append | indent 4 }}
|
|
{{- end }}
|
|
{{- end }}
|