blob: 9d0013042386853a83679e9add00628b6eb7609e [file] [log] [blame]
Mohammed Naserf3f59a72023-01-15 21:02:04 -05001{{/*
2Licensed under the Apache License, Version 2.0 (the "License");
3you may not use this file except in compliance with the License.
4You may obtain a copy of the License at
5
6 http://www.apache.org/licenses/LICENSE-2.0
7
8Unless required by applicable law or agreed to in writing, software
9distributed under the License is distributed on an "AS IS" BASIS,
10WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11See the License for the specific language governing permissions and
12limitations under the License.
13*/}}
14
15{{- if (.Values.global).subchart_release_name }}
16{{- $_ := set . "deployment_name" .Chart.Name }}
17{{- else }}
18{{- $_ := set . "deployment_name" .Release.Name }}
19{{- end }}
20
21{{- define "neutron.configmap.etc" }}
22{{- $configMapName := index . 0 }}
23{{- $envAll := index . 1 }}
24{{- with $envAll }}
25
26{{- if empty $envAll.Values.conf.neutron.keystone_authtoken.auth_uri -}}
27{{- $_ := tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup"| set $envAll.Values.conf.neutron.keystone_authtoken "auth_uri" -}}
28{{- end }}
29
30{{- if empty $envAll.Values.conf.neutron.keystone_authtoken.auth_url -}}
31{{- $_ := tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup"| set $envAll.Values.conf.neutron.keystone_authtoken "auth_url" -}}
32{{- end }}
33
34{{- if empty .Values.conf.neutron.keystone_authtoken.project_name -}}
35{{- $_ := set .Values.conf.neutron.keystone_authtoken "project_name" .Values.endpoints.identity.auth.neutron.project_name -}}
36{{- end -}}
37{{- if empty $envAll.Values.conf.neutron.keystone_authtoken.project_domain_name -}}
38{{- $_ := set $envAll.Values.conf.neutron.keystone_authtoken "project_domain_name" $envAll.Values.endpoints.identity.auth.neutron.project_domain_name -}}
39{{- end -}}
40{{- if empty $envAll.Values.conf.neutron.keystone_authtoken.user_domain_name -}}
41{{- $_ := set $envAll.Values.conf.neutron.keystone_authtoken "user_domain_name" $envAll.Values.endpoints.identity.auth.neutron.user_domain_name -}}
42{{- end -}}
43{{- if empty $envAll.Values.conf.neutron.keystone_authtoken.username -}}
44{{- $_ := set $envAll.Values.conf.neutron.keystone_authtoken "username" $envAll.Values.endpoints.identity.auth.neutron.username -}}
45{{- end -}}
46{{- if empty $envAll.Values.conf.neutron.keystone_authtoken.password -}}
47{{- $_ := set $envAll.Values.conf.neutron.keystone_authtoken "password" $envAll.Values.endpoints.identity.auth.neutron.password -}}
48{{- end -}}
49{{- if empty $envAll.Values.conf.neutron.keystone_authtoken.region_name -}}
50{{- $_ := set $envAll.Values.conf.neutron.keystone_authtoken "region_name" $envAll.Values.endpoints.identity.auth.neutron.region_name -}}
51{{- end -}}
52
53{{- if empty $envAll.Values.conf.neutron.keystone_authtoken.memcached_servers -}}
54{{- $_ := tuple "oslo_cache" "internal" "memcache" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" | set $envAll.Values.conf.neutron.keystone_authtoken "memcached_servers" -}}
55{{- end }}
56{{- if empty .Values.conf.neutron.keystone_authtoken.memcache_secret_key -}}
57{{- $_ := set .Values.conf.neutron.keystone_authtoken "memcache_secret_key" ( default ( randAlphaNum 64 ) .Values.endpoints.oslo_cache.auth.memcache_secret_key ) -}}
58{{- end -}}
59
60{{- if empty $envAll.Values.conf.neutron.database.connection -}}
61{{- $connection := tuple "oslo_db" "internal" "neutron" "mysql" . | include "helm-toolkit.endpoints.authenticated_endpoint_uri_lookup" -}}
62{{- if .Values.manifests.certificates -}}
63{{- $_ := (printf "%s?charset=utf8&ssl_ca=/etc/mysql/certs/ca.crt&ssl_key=/etc/mysql/certs/tls.key&ssl_cert=/etc/mysql/certs/tls.crt&ssl_verify_cert" $connection ) | set .Values.conf.neutron.database "connection" -}}
64{{- else -}}
65{{- $_ := set .Values.conf.neutron.database "connection" $connection -}}
66{{- end -}}
67{{- end }}
68
69{{- if empty $envAll.Values.conf.neutron.DEFAULT.transport_url -}}
70{{- $_ := tuple "oslo_messaging" "internal" "neutron" "amqp" . | include "helm-toolkit.endpoints.authenticated_transport_endpoint_uri_lookup" | set $envAll.Values.conf.neutron.DEFAULT "transport_url" -}}
71{{- end }}
72
73{{- if empty $envAll.Values.conf.neutron.nova.auth_url -}}
74{{- $_ := tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup"| set $envAll.Values.conf.neutron.nova "auth_url" -}}
75{{- end }}
76
77{{- if empty $envAll.Values.conf.neutron.nova.region_name -}}
78{{- $_ := set $envAll.Values.conf.neutron.nova "region_name" $envAll.Values.endpoints.identity.auth.nova.region_name -}}
79{{- end -}}
80{{- if empty $envAll.Values.conf.neutron.nova.project_name -}}
81{{- $_ := set $envAll.Values.conf.neutron.nova "project_name" $envAll.Values.endpoints.identity.auth.nova.project_name -}}
82{{- end -}}
83{{- if empty $envAll.Values.conf.neutron.nova.project_domain_name -}}
84{{- $_ := set $envAll.Values.conf.neutron.nova "project_domain_name" $envAll.Values.endpoints.identity.auth.nova.project_domain_name -}}
85{{- end -}}
86{{- if empty $envAll.Values.conf.neutron.nova.user_domain_name -}}
87{{- $_ := set $envAll.Values.conf.neutron.nova "user_domain_name" $envAll.Values.endpoints.identity.auth.nova.user_domain_name -}}
88{{- end -}}
89{{- if empty $envAll.Values.conf.neutron.nova.username -}}
90{{- $_ := set $envAll.Values.conf.neutron.nova "username" $envAll.Values.endpoints.identity.auth.nova.username -}}
91{{- end -}}
92{{- if empty $envAll.Values.conf.neutron.nova.password -}}
93{{- $_ := set $envAll.Values.conf.neutron.nova "password" $envAll.Values.endpoints.identity.auth.nova.password -}}
94{{- end -}}
95
Oleksandr Kozachenkoa10d7852023-02-02 22:01:16 +010096{{- if empty $envAll.Values.conf.neutron.placement.auth_url -}}
97{{- $_ := tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup"| set $envAll.Values.conf.neutron.placement "auth_url" -}}
98{{- end }}
99
100{{- if empty $envAll.Values.conf.neutron.placement.region_name -}}
101{{- $_ := set $envAll.Values.conf.neutron.placement "region_name" $envAll.Values.endpoints.identity.auth.placement.region_name -}}
102{{- end -}}
103{{- if empty $envAll.Values.conf.neutron.placement.project_name -}}
104{{- $_ := set $envAll.Values.conf.neutron.placement "project_name" $envAll.Values.endpoints.identity.auth.placement.project_name -}}
105{{- end -}}
106{{- if empty $envAll.Values.conf.neutron.placement.project_domain_name -}}
107{{- $_ := set $envAll.Values.conf.neutron.placement "project_domain_name" $envAll.Values.endpoints.identity.auth.placement.project_domain_name -}}
108{{- end -}}
109{{- if empty $envAll.Values.conf.neutron.placement.user_domain_name -}}
110{{- $_ := set $envAll.Values.conf.neutron.placement "user_domain_name" $envAll.Values.endpoints.identity.auth.placement.user_domain_name -}}
111{{- end -}}
112{{- if empty $envAll.Values.conf.neutron.placement.username -}}
113{{- $_ := set $envAll.Values.conf.neutron.placement "username" $envAll.Values.endpoints.identity.auth.placement.username -}}
114{{- end -}}
115{{- if empty $envAll.Values.conf.neutron.placement.password -}}
116{{- $_ := set $envAll.Values.conf.neutron.placement "password" $envAll.Values.endpoints.identity.auth.placement.password -}}
117{{- end -}}
118
Mohammed Naserf3f59a72023-01-15 21:02:04 -0500119{{- if empty $envAll.Values.conf.neutron.octavia.base_url -}}
120{{- $_ := tuple "load_balancer" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup"| set $envAll.Values.conf.neutron.octavia "base_url" -}}
121{{- end }}
122
Mohammed Naserf3f59a72023-01-15 21:02:04 -0500123{{- if empty $envAll.Values.conf.metadata_agent.DEFAULT.nova_metadata_host -}}
Rico Lin0e153482024-05-03 03:29:14 +0800124{{- $_ := tuple "compute_metadata" "internal" . | include "helm-toolkit.endpoints.hostname_fqdn_endpoint_lookup" | set $envAll.Values.conf.metadata_agent.DEFAULT "nova_metadata_host" -}}
Mohammed Naserf3f59a72023-01-15 21:02:04 -0500125{{- end -}}
126{{- if empty $envAll.Values.conf.metadata_agent.DEFAULT.nova_metadata_port -}}
Rico Lin0e153482024-05-03 03:29:14 +0800127{{- $_ := tuple "compute_metadata" "internal" "metadata" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | set $envAll.Values.conf.metadata_agent.DEFAULT "nova_metadata_port" }}
Mohammed Naserf3f59a72023-01-15 21:02:04 -0500128{{- end -}}
129{{- if empty $envAll.Values.conf.metadata_agent.cache.memcache_servers -}}
130{{- $_ := tuple "oslo_cache" "internal" "memcache" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" | set $envAll.Values.conf.metadata_agent.cache "memcache_servers" -}}
131{{- end -}}
132
Mohammed Naser593ec012023-07-23 09:20:05 +0000133{{- if empty $envAll.Values.conf.ovn_metadata_agent.DEFAULT.nova_metadata_host -}}
Mohammed Naser1d75a922023-07-23 19:24:49 +0000134{{- $_ := tuple "compute_metadata" "internal" . | include "helm-toolkit.endpoints.hostname_fqdn_endpoint_lookup" | set $envAll.Values.conf.ovn_metadata_agent.DEFAULT "nova_metadata_host" -}}
Mohammed Naser593ec012023-07-23 09:20:05 +0000135{{- end -}}
136{{- if empty $envAll.Values.conf.ovn_metadata_agent.cache.memcache_servers -}}
Mohammed Naser1d75a922023-07-23 19:24:49 +0000137{{- $_ := tuple "oslo_cache" "internal" "memcache" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" | set $envAll.Values.conf.ovn_metadata_agent.cache "memcache_servers" -}}
Mohammed Naser593ec012023-07-23 09:20:05 +0000138{{- end -}}
139{{- if empty $envAll.Values.conf.ovn_metadata_agent.DEFAULT.nova_metadata_port -}}
Mohammed Naser1d75a922023-07-23 19:24:49 +0000140{{- $_ := tuple "compute_metadata" "internal" "metadata" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | set $envAll.Values.conf.ovn_metadata_agent.DEFAULT "nova_metadata_port" }}
Mohammed Naser593ec012023-07-23 09:20:05 +0000141{{- end -}}
142
Mohammed Naserf3f59a72023-01-15 21:02:04 -0500143{{- if empty $envAll.Values.conf.neutron.DEFAULT.interface_driver -}}
144{{- $_ := set $envAll.Values "__interface_driver" ( list ) }}
145{{- if ( has "openvswitch" $envAll.Values.network.backend ) -}}
146{{ $__interface_driver := append $envAll.Values.__interface_driver "openvswitch" }}
147{{- $_ := set $envAll.Values "__interface_driver" $__interface_driver }}
148{{- end -}}
149{{- if ( has "linuxbridge" $envAll.Values.network.backend ) -}}
150{{ $__interface_driver := append $envAll.Values.__interface_driver "linuxbridge" }}
151{{- $_ := set $envAll.Values "__interface_driver" $__interface_driver }}
152{{- end -}}
153{{- $_ := set $envAll.Values.conf.neutron.DEFAULT "interface_driver" $envAll.Values.__interface_driver -}}
154{{- end -}}
155
156{{- if empty $envAll.Values.conf.dhcp_agent.DEFAULT.interface_driver -}}
157{{- $_ := set $envAll.Values "__interface_driver" ( list ) }}
JustHumanz22d46722025-02-11 00:09:55 +0700158{{- if or ( has "openvswitch" $envAll.Values.network.backend ) ( has "ovn" $envAll.Values.network.backend ) -}}
Mohammed Naserf3f59a72023-01-15 21:02:04 -0500159{{ $__interface_driver := append $envAll.Values.__interface_driver "openvswitch" }}
160{{- $_ := set $envAll.Values "__interface_driver" $__interface_driver }}
161{{- end -}}
162{{- if ( has "linuxbridge" $envAll.Values.network.backend ) -}}
163{{ $__interface_driver := append $envAll.Values.__interface_driver "linuxbridge" }}
164{{- $_ := set $envAll.Values "__interface_driver" $__interface_driver }}
165{{- end -}}
166{{- $_ := set $envAll.Values.conf.dhcp_agent.DEFAULT "interface_driver" $envAll.Values.__interface_driver -}}
167{{- end -}}
JustHumanz22d46722025-02-11 00:09:55 +0700168{{- if and (has "ovn" $envAll.Values.network.backend) (empty $envAll.Values.conf.dhcp_agent.ovs.ovsdb_connection) -}}
169{{- $_ := set $envAll.Values.conf.dhcp_agent.ovs "ovsdb_connection" "unix:/run/openvswitch/db.sock" -}}
170{{- end -}}
Mohammed Naserf3f59a72023-01-15 21:02:04 -0500171
172{{- if empty $envAll.Values.conf.l3_agent.DEFAULT.interface_driver -}}
173{{- $_ := set $envAll.Values "__interface_driver" ( list ) }}
174{{- if ( has "openvswitch" $envAll.Values.network.backend ) -}}
175{{ $__interface_driver := append $envAll.Values.__interface_driver "openvswitch" }}
176{{- $_ := set $envAll.Values "__interface_driver" $__interface_driver }}
177{{- end -}}
178{{- if ( has "linuxbridge" $envAll.Values.network.backend ) -}}
179{{ $__interface_driver := append $envAll.Values.__interface_driver "linuxbridge" }}
180{{- $_ := set $envAll.Values "__interface_driver" $__interface_driver }}
181{{- end -}}
182{{- $_ := set $envAll.Values.conf.l3_agent.DEFAULT "interface_driver" $envAll.Values.__interface_driver -}}
183{{- end -}}
184
185{{- if empty $envAll.Values.conf.plugins.ml2_conf.ml2.mechanism_drivers -}}
186{{- if (contains "vxlan" $envAll.Values.conf.plugins.ml2_conf.ml2.tenant_network_types) -}}
187{{- $_ := set $envAll.Values "__mechanism_drivers" (append $envAll.Values.network.backend "l2population") -}}
188{{- end -}}
189{{- $_ := set $envAll.Values.conf.plugins.ml2_conf.ml2 "mechanism_drivers" ($envAll.Values.__mechanism_drivers | default $envAll.Values.network.backend | uniq) -}}
190{{- end -}}
191
192{{- if empty .Values.conf.neutron.DEFAULT.bind_port -}}
193{{- $_ := tuple "network" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | set .Values.conf.neutron.DEFAULT "bind_port" -}}
194{{- end -}}
Rico Lin0e153482024-05-03 03:29:14 +0800195{{- if empty .Values.conf.neutron_api_uwsgi.uwsgi.processes -}}
196{{- $_ := set .Values.conf.neutron_api_uwsgi.uwsgi "processes" .Values.conf.neutron.DEFAULT.api_workers -}}
197{{- end -}}
198{{- if empty (index .Values.conf.neutron_api_uwsgi.uwsgi "http-socket") -}}
199{{- $http_socket_port := tuple "network" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | toString }}
200{{- $http_socket := printf "0.0.0.0:%s" $http_socket_port }}
201{{- $_ := set .Values.conf.neutron_api_uwsgi.uwsgi "http-socket" $http_socket -}}
202{{- end -}}
Mohammed Naserf3f59a72023-01-15 21:02:04 -0500203
Rico Lin71132432024-07-03 02:15:57 +0800204{{- if empty .Values.conf.neutron_policy_server_uwsgi.uwsgi.processes -}}
205{{- $_ := set .Values.conf.neutron_policy_server_uwsgi.uwsgi "processes" .Values.conf.neutron.DEFAULT.api_workers -}}
206{{- end -}}
207{{- if empty (index .Values.conf.neutron_policy_server_uwsgi.uwsgi "http-socket") -}}
208{{- $http_socket_port := tuple "network" "service" "policy_server" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | toString }}
209{{- $http_socket := printf "0.0.0.0:%s" $http_socket_port }}
210{{- $_ := set .Values.conf.neutron_policy_server_uwsgi.uwsgi "http-socket" $http_socket -}}
211{{- end -}}
212
Mohammed Naserf3f59a72023-01-15 21:02:04 -0500213{{- if and (empty .Values.conf.logging.handler_fluent) (has "fluent" .Values.conf.logging.handlers.keys) -}}
214{{- $fluentd_host := tuple "fluentd" "internal" $envAll | include "helm-toolkit.endpoints.hostname_namespaced_endpoint_lookup" }}
215{{- $fluentd_port := tuple "fluentd" "internal" "service" $envAll | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
216{{- $fluent_args := printf "('%s.%s', '%s', %s)" .Release.Namespace .deployment_name $fluentd_host $fluentd_port }}
217{{- $handler_fluent := dict "class" "fluent.handler.FluentHandler" "formatter" "fluent" "args" $fluent_args -}}
218{{- $_ := set .Values.conf.logging "handler_fluent" $handler_fluent -}}
219{{- end -}}
220
221{{- if and (empty .Values.conf.logging.formatter_fluent) (has "fluent" .Values.conf.logging.formatters.keys) -}}
222{{- $formatter_fluent := dict "class" "oslo_log.formatters.FluentFormatter" -}}
223{{- $_ := set .Values.conf.logging "formatter_fluent" $formatter_fluent -}}
224{{- end -}}
225
226{{- if .Values.conf.ovs_dpdk.enabled -}}
227{{- $_ := set $envAll.Values.conf.plugins.openvswitch_agent.ovs "datapath_type" "netdev" -}}
228{{- if empty $envAll.Values.conf.plugins.openvswitch_agent.ovs.vhostuser_socket_dir -}}
229{{- $_ := set $envAll.Values.conf.plugins.openvswitch_agent.ovs "vhostuser_socket_dir" "/run/openvswitch/vhostuser" -}}
230{{- end -}}
231{{- end -}}
232
233{{/* Designate DNS driver */}}
234{{- if eq (.Values.conf.neutron.DEFAULT.external_dns_driver | default "") "designate" -}}
235{{- if empty .Values.conf.neutron.designate.project_name -}}
236{{- $_ := set .Values.conf.neutron.designate "project_name" .Values.endpoints.identity.auth.designate.project_name -}}
237{{- end -}}
238{{- if empty .Values.conf.neutron.designate.project_domain_name -}}
239{{- $_ := set .Values.conf.neutron.designate "project_domain_name" .Values.endpoints.identity.auth.designate.project_domain_name -}}
240{{- end -}}
241{{- if empty .Values.conf.neutron.designate.user_domain_name -}}
242{{- $_ := set .Values.conf.neutron.designate "user_domain_name" .Values.endpoints.identity.auth.designate.user_domain_name -}}
243{{- end -}}
244{{- if empty .Values.conf.neutron.designate.username -}}
245{{- $_ := set .Values.conf.neutron.designate "username" .Values.endpoints.identity.auth.designate.username -}}
246{{- end -}}
247{{- if empty .Values.conf.neutron.designate.password -}}
248{{- $_ := set .Values.conf.neutron.designate "password" .Values.endpoints.identity.auth.designate.password -}}
249{{- end -}}
Oleksandr Kde653d12023-12-06 20:12:30 +0100250{{- if empty .Values.conf.neutron.designate.auth_url -}}
251{{- $_ := tuple "dns" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" | set .Values.conf.neutron.designate "auth_url" -}}
Mohammed Naserf3f59a72023-01-15 21:02:04 -0500252{{- end -}}
253{{- end }}
254
255{{- if (has "baremetal" .Values.network.backend) -}}
256{{- if empty .Values.conf.neutron.ironic.project_name -}}
257{{- $_ := set .Values.conf.neutron.ironic "project_name" .Values.endpoints.identity.auth.ironic.project_name -}}
258{{- end -}}
259{{- if empty .Values.conf.neutron.ironic.project_domain_name -}}
260{{- $_ := set .Values.conf.neutron.ironic "project_domain_name" .Values.endpoints.identity.auth.ironic.project_domain_name -}}
261{{- end -}}
262{{- if empty .Values.conf.neutron.ironic.user_domain_name -}}
263{{- $_ := set .Values.conf.neutron.ironic "user_domain_name" .Values.endpoints.identity.auth.ironic.user_domain_name -}}
264{{- end -}}
265{{- if empty .Values.conf.neutron.ironic.username -}}
266{{- $_ := set .Values.conf.neutron.ironic "username" .Values.endpoints.identity.auth.ironic.username -}}
267{{- end -}}
268{{- if empty .Values.conf.neutron.ironic.password -}}
269{{- $_ := set .Values.conf.neutron.ironic "password" .Values.endpoints.identity.auth.ironic.password -}}
270{{- end -}}
Rico Lin9245bf72024-10-22 01:16:35 +0800271{{- if empty $envAll.Values.conf.neutron.ironic.auth_url -}}
272{{- $_ := tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup"| set $envAll.Values.conf.neutron.ironic "auth_url" -}}
273{{- end }}
Mohammed Naserf3f59a72023-01-15 21:02:04 -0500274{{- end -}}
275
276{{- if ( has "tungstenfabric" .Values.network.backend ) -}}
277{{- if empty .Values.conf.plugins.tungstenfabric.KEYSTONE.auth_url -}}
278{{- $_ := tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" | set .Values.conf.plugins.tungstenfabric.KEYSTONE "auth_url" -}}
279{{- end -}}
280{{- if empty .Values.conf.plugins.tungstenfabric.KEYSTONE.admin_user -}}
281{{- $_ := set .Values.conf.plugins.tungstenfabric.KEYSTONE "admin_user" .Values.endpoints.identity.auth.admin.username -}}
282{{- end -}}
283{{- if empty .Values.conf.plugins.tungstenfabric.KEYSTONE.admin_password -}}
284{{- $_ := set .Values.conf.plugins.tungstenfabric.KEYSTONE "admin_password" .Values.endpoints.identity.auth.admin.password -}}
285{{- end -}}
286{{- if empty .Values.conf.plugins.tungstenfabric.KEYSTONE.admin_tenant_name -}}
287{{- $_ := set .Values.conf.plugins.tungstenfabric.KEYSTONE "admin_tenant_name" .Values.endpoints.identity.auth.admin.project_name -}}
288{{- end -}}
289{{- if empty .Values.conf.plugins.tf_vnc_api_lib.auth.AUTHN_SERVER -}}
290{{- $_ := tuple "identity" . | include "helm-toolkit.endpoints.keystone_endpoint_name_lookup" | set .Values.conf.plugins.tf_vnc_api_lib.auth "AUTHN_SERVER" -}}
291{{- end -}}
292{{- if empty .Values.conf.plugins.tf_vnc_api_lib.auth.AUTHN_PORT -}}
293{{- $_ := tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | set .Values.conf.plugins.tf_vnc_api_lib.auth "AUTHN_PORT" -}}
294{{- end -}}
295{{- if empty .Values.conf.plugins.tf_vnc_api_lib.auth.AUTHN_DOMAIN -}}
296{{- $_ := set .Values.conf.plugins.tf_vnc_api_lib.auth "AUTHN_DOMAIN" .Values.endpoints.identity.auth.neutron.project_domain_name -}}
297{{- end -}}
298{{- end -}}
299
300---
301apiVersion: v1
302kind: Secret
303metadata:
304 name: {{ $configMapName }}
305type: Opaque
306data:
307 rally_tests.yaml: {{ toYaml $envAll.Values.conf.rally_tests.tests | b64enc }}
308 api-paste.ini: {{ include "helm-toolkit.utils.to_ini" $envAll.Values.conf.paste | b64enc }}
309 policy.yaml: {{ toYaml $envAll.Values.conf.policy | b64enc }}
Rico Lin0e153482024-05-03 03:29:14 +0800310 neutron-api-uwsgi.ini: {{ include "helm-toolkit.utils.to_oslo_conf" .Values.conf.neutron_api_uwsgi | b64enc }}
Rico Lin71132432024-07-03 02:15:57 +0800311 neutron-policy-server-uwsgi.ini: {{ include "helm-toolkit.utils.to_oslo_conf" .Values.conf.neutron_policy_server_uwsgi | b64enc }}
Mohammed Naserf3f59a72023-01-15 21:02:04 -0500312 neutron.conf: {{ include "helm-toolkit.utils.to_oslo_conf" $envAll.Values.conf.neutron | b64enc }}
313 logging.conf: {{ include "helm-toolkit.utils.to_oslo_conf" .Values.conf.logging | b64enc }}
314 api_audit_map.conf: {{ include "helm-toolkit.utils.to_oslo_conf" .Values.conf.api_audit_map | b64enc }}
315 dhcp_agent.ini: {{ include "helm-toolkit.utils.to_oslo_conf" $envAll.Values.conf.dhcp_agent | b64enc }}
316 l3_agent.ini: {{ include "helm-toolkit.utils.to_oslo_conf" $envAll.Values.conf.l3_agent | b64enc }}
Mohammed Naserf3f59a72023-01-15 21:02:04 -0500317 metering_agent.ini: {{ default "\"\"" (include "helm-toolkit.utils.to_oslo_conf" $envAll.Values.conf.metering_agent | b64enc) }}
318 taas_plugin.ini: {{ default "\"\"" (include "helm-toolkit.utils.to_oslo_conf" $envAll.Values.conf.taas_plugin | b64enc) }}
319 ml2_conf.ini: {{ include "helm-toolkit.utils.to_oslo_conf" $envAll.Values.conf.plugins.ml2_conf | b64enc }}
320 ml2_conf_sriov.ini: {{ default "\"\"" (include "helm-toolkit.utils.to_oslo_conf" $envAll.Values.conf.plugins.ml2_conf_sriov | b64enc) }}
321 taas.ini: {{ include "helm-toolkit.utils.to_oslo_conf" $envAll.Values.conf.plugins.taas | b64enc }}
322 l2gw_plugin.ini: {{ default "\"\"" (include "helm-toolkit.utils.to_oslo_conf" .Values.conf.plugins.l2gateway | b64enc) }}
323 macvtap_agent.ini: {{ default "\"\"" (include "helm-toolkit.utils.to_oslo_conf" $envAll.Values.conf.plugins.macvtap_agent | b64enc) }}
324 linuxbridge_agent.ini: {{ include "helm-toolkit.utils.to_oslo_conf" $envAll.Values.conf.plugins.linuxbridge_agent | b64enc }}
325 openvswitch_agent.ini: {{ include "helm-toolkit.utils.to_oslo_conf" $envAll.Values.conf.plugins.openvswitch_agent | b64enc }}
326 sriov_agent.ini: {{ include "helm-toolkit.utils.to_oslo_conf" $envAll.Values.conf.plugins.sriov_agent | b64enc }}
327 l2gw_agent.ini: {{ default "\"\"" (include "helm-toolkit.utils.to_oslo_conf" .Values.conf.l2gateway_agent | b64enc) }}
328 bagpipe_bgp.conf: {{ default "\"\"" (include "helm-toolkit.utils.to_oslo_conf" .Values.conf.bagpipe_bgp | b64enc) }}
Rico Lincf86b122023-11-02 01:29:14 +0800329 bgp_dragent.ini: {{ default "\"\"" (include "helm-toolkit.utils.to_oslo_conf" .Values.conf.bgp_dragent | b64enc) }}
Mohammed Naserf3f59a72023-01-15 21:02:04 -0500330 tf_plugin.ini: {{ default "\"\"" (include "helm-toolkit.utils.to_oslo_conf" $envAll.Values.conf.plugins.tungstenfabric | b64enc) }}
331 vnc_api_lib.ini: {{ default "\"\"" (include "helm-toolkit.utils.to_oslo_conf" $envAll.Values.conf.plugins.tf_vnc_api_lib | b64enc) }}
332 dnsmasq.conf: "{{ $envAll.Values.conf.dnsmasq | b64enc }}"
333 neutron_sudoers: {{ $envAll.Values.conf.neutron_sudoers | b64enc }}
334 rootwrap.conf: {{ $envAll.Values.conf.rootwrap | b64enc }}
335 auto_bridge_add: {{ toJson $envAll.Values.conf.auto_bridge_add | b64enc }}
Rico Lin9245bf72024-10-22 01:16:35 +0800336 neutron_vpnaas.conf: {{ default "\"\"" (include "helm-toolkit.utils.to_oslo_conf" $envAll.Values.conf.neutron_vpnaas | b64enc) }}
ricolin18e6fd32023-07-17 06:17:15 +0000337{{- if .Values.conf.netoffload.enabled }}
Mohammed Nasera720f882023-06-30 23:48:02 -0400338 netoffload: {{ toJson $envAll.Values.conf.netoffload | b64enc }}
ricolin18e6fd32023-07-17 06:17:15 +0000339{{- end }}
Mohammed Naserf3f59a72023-01-15 21:02:04 -0500340 dpdk.conf: {{ toJson $envAll.Values.conf.ovs_dpdk | b64enc }}
341 update_dpdk_bond_config: {{ $envAll.Values.conf.ovs_dpdk.update_dpdk_bond_config | toString | b64enc }}
Oleksandr Kozachenkoc0022be2023-05-23 20:36:21 +0200342{{- if ( has "ovn" .Values.network.backend ) }}
Rico Lin9245bf72024-10-22 01:16:35 +0800343 neutron_ovn_vpn_agent.ini: {{ include "helm-toolkit.utils.to_oslo_conf" $envAll.Values.conf.ovn_vpn_agent | b64enc }}
Oleksandr Kozachenkoc0022be2023-05-23 20:36:21 +0200344 ovn_metadata_agent.ini: {{ include "helm-toolkit.utils.to_oslo_conf" $envAll.Values.conf.ovn_metadata_agent | b64enc }}
345{{- else }}
346 metadata_agent.ini: {{ include "helm-toolkit.utils.to_oslo_conf" $envAll.Values.conf.metadata_agent | b64enc }}
347{{- end }}
348
Mohammed Naserf3f59a72023-01-15 21:02:04 -0500349{{- if .Values.manifests.certificates }}
350{{- include "helm-toolkit.snippets.values_template_renderer" ( dict "envAll" $envAll "template" .Values.conf.nginx "key" "nginx.conf" "format" "Secret" ) | indent 2 }}
351{{- end }}
352{{- range $key, $value := $envAll.Values.conf.rootwrap_filters }}
353{{- $filePrefix := replace "_" "-" $key }}
354 {{ printf "%s.filters" $filePrefix }}: {{ $value.content | b64enc }}
355{{- end }}
356{{- end }}
357{{- end }}
358
359{{- if .Values.manifests.configmap_etc }}
360{{- list "neutron-etc" . | include "neutron.configmap.etc" }}
361{{- end }}