Mohammed Naser | f3f59a7 | 2023-01-15 21:02:04 -0500 | [diff] [blame] | 1 | {{/* |
| 2 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 3 | you may not use this file except in compliance with the License. |
| 4 | You may obtain a copy of the License at |
| 5 | |
| 6 | http://www.apache.org/licenses/LICENSE-2.0 |
| 7 | |
| 8 | Unless required by applicable law or agreed to in writing, software |
| 9 | distributed under the License is distributed on an "AS IS" BASIS, |
| 10 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 11 | See the License for the specific language governing permissions and |
| 12 | limitations 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 Kozachenko | a10d785 | 2023-02-02 22:01:16 +0100 | [diff] [blame] | 96 | {{- 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 Naser | f3f59a7 | 2023-01-15 21:02:04 -0500 | [diff] [blame] | 119 | {{- 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 Naser | f3f59a7 | 2023-01-15 21:02:04 -0500 | [diff] [blame] | 123 | {{- if empty $envAll.Values.conf.metadata_agent.DEFAULT.nova_metadata_host -}} |
Rico Lin | 0e15348 | 2024-05-03 03:29:14 +0800 | [diff] [blame] | 124 | {{- $_ := tuple "compute_metadata" "internal" . | include "helm-toolkit.endpoints.hostname_fqdn_endpoint_lookup" | set $envAll.Values.conf.metadata_agent.DEFAULT "nova_metadata_host" -}} |
Mohammed Naser | f3f59a7 | 2023-01-15 21:02:04 -0500 | [diff] [blame] | 125 | {{- end -}} |
| 126 | {{- if empty $envAll.Values.conf.metadata_agent.DEFAULT.nova_metadata_port -}} |
Rico Lin | 0e15348 | 2024-05-03 03:29:14 +0800 | [diff] [blame] | 127 | {{- $_ := tuple "compute_metadata" "internal" "metadata" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | set $envAll.Values.conf.metadata_agent.DEFAULT "nova_metadata_port" }} |
Mohammed Naser | f3f59a7 | 2023-01-15 21:02:04 -0500 | [diff] [blame] | 128 | {{- 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 Naser | 593ec01 | 2023-07-23 09:20:05 +0000 | [diff] [blame] | 133 | {{- if empty $envAll.Values.conf.ovn_metadata_agent.DEFAULT.nova_metadata_host -}} |
Mohammed Naser | 1d75a92 | 2023-07-23 19:24:49 +0000 | [diff] [blame] | 134 | {{- $_ := tuple "compute_metadata" "internal" . | include "helm-toolkit.endpoints.hostname_fqdn_endpoint_lookup" | set $envAll.Values.conf.ovn_metadata_agent.DEFAULT "nova_metadata_host" -}} |
Mohammed Naser | 593ec01 | 2023-07-23 09:20:05 +0000 | [diff] [blame] | 135 | {{- end -}} |
| 136 | {{- if empty $envAll.Values.conf.ovn_metadata_agent.cache.memcache_servers -}} |
Mohammed Naser | 1d75a92 | 2023-07-23 19:24:49 +0000 | [diff] [blame] | 137 | {{- $_ := 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 Naser | 593ec01 | 2023-07-23 09:20:05 +0000 | [diff] [blame] | 138 | {{- end -}} |
| 139 | {{- if empty $envAll.Values.conf.ovn_metadata_agent.DEFAULT.nova_metadata_port -}} |
Mohammed Naser | 1d75a92 | 2023-07-23 19:24:49 +0000 | [diff] [blame] | 140 | {{- $_ := tuple "compute_metadata" "internal" "metadata" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | set $envAll.Values.conf.ovn_metadata_agent.DEFAULT "nova_metadata_port" }} |
Mohammed Naser | 593ec01 | 2023-07-23 09:20:05 +0000 | [diff] [blame] | 141 | {{- end -}} |
| 142 | |
Mohammed Naser | f3f59a7 | 2023-01-15 21:02:04 -0500 | [diff] [blame] | 143 | {{- 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 ) }} |
JustHumanz | 22d4672 | 2025-02-11 00:09:55 +0700 | [diff] [blame] | 158 | {{- if or ( has "openvswitch" $envAll.Values.network.backend ) ( has "ovn" $envAll.Values.network.backend ) -}} |
Mohammed Naser | f3f59a7 | 2023-01-15 21:02:04 -0500 | [diff] [blame] | 159 | {{ $__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 -}} |
JustHumanz | 22d4672 | 2025-02-11 00:09:55 +0700 | [diff] [blame] | 168 | {{- 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 Naser | f3f59a7 | 2023-01-15 21:02:04 -0500 | [diff] [blame] | 171 | |
| 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 Lin | 0e15348 | 2024-05-03 03:29:14 +0800 | [diff] [blame] | 195 | {{- 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 Naser | f3f59a7 | 2023-01-15 21:02:04 -0500 | [diff] [blame] | 203 | |
Rico Lin | 7113243 | 2024-07-03 02:15:57 +0800 | [diff] [blame] | 204 | {{- 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 Naser | f3f59a7 | 2023-01-15 21:02:04 -0500 | [diff] [blame] | 213 | {{- 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 K | de653d1 | 2023-12-06 20:12:30 +0100 | [diff] [blame] | 250 | {{- 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 Naser | f3f59a7 | 2023-01-15 21:02:04 -0500 | [diff] [blame] | 252 | {{- 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 Lin | 9245bf7 | 2024-10-22 01:16:35 +0800 | [diff] [blame] | 271 | {{- 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 Naser | f3f59a7 | 2023-01-15 21:02:04 -0500 | [diff] [blame] | 274 | {{- 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 | --- |
| 301 | apiVersion: v1 |
| 302 | kind: Secret |
| 303 | metadata: |
| 304 | name: {{ $configMapName }} |
| 305 | type: Opaque |
| 306 | data: |
| 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 Lin | 0e15348 | 2024-05-03 03:29:14 +0800 | [diff] [blame] | 310 | neutron-api-uwsgi.ini: {{ include "helm-toolkit.utils.to_oslo_conf" .Values.conf.neutron_api_uwsgi | b64enc }} |
Rico Lin | 7113243 | 2024-07-03 02:15:57 +0800 | [diff] [blame] | 311 | neutron-policy-server-uwsgi.ini: {{ include "helm-toolkit.utils.to_oslo_conf" .Values.conf.neutron_policy_server_uwsgi | b64enc }} |
Mohammed Naser | f3f59a7 | 2023-01-15 21:02:04 -0500 | [diff] [blame] | 312 | 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 Naser | f3f59a7 | 2023-01-15 21:02:04 -0500 | [diff] [blame] | 317 | 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 Lin | cf86b12 | 2023-11-02 01:29:14 +0800 | [diff] [blame] | 329 | bgp_dragent.ini: {{ default "\"\"" (include "helm-toolkit.utils.to_oslo_conf" .Values.conf.bgp_dragent | b64enc) }} |
Mohammed Naser | f3f59a7 | 2023-01-15 21:02:04 -0500 | [diff] [blame] | 330 | 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 Lin | 9245bf7 | 2024-10-22 01:16:35 +0800 | [diff] [blame] | 336 | neutron_vpnaas.conf: {{ default "\"\"" (include "helm-toolkit.utils.to_oslo_conf" $envAll.Values.conf.neutron_vpnaas | b64enc) }} |
ricolin | 18e6fd3 | 2023-07-17 06:17:15 +0000 | [diff] [blame] | 337 | {{- if .Values.conf.netoffload.enabled }} |
Mohammed Naser | a720f88 | 2023-06-30 23:48:02 -0400 | [diff] [blame] | 338 | netoffload: {{ toJson $envAll.Values.conf.netoffload | b64enc }} |
ricolin | 18e6fd3 | 2023-07-17 06:17:15 +0000 | [diff] [blame] | 339 | {{- end }} |
Mohammed Naser | f3f59a7 | 2023-01-15 21:02:04 -0500 | [diff] [blame] | 340 | 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 Kozachenko | c0022be | 2023-05-23 20:36:21 +0200 | [diff] [blame] | 342 | {{- if ( has "ovn" .Values.network.backend ) }} |
Rico Lin | 9245bf7 | 2024-10-22 01:16:35 +0800 | [diff] [blame] | 343 | neutron_ovn_vpn_agent.ini: {{ include "helm-toolkit.utils.to_oslo_conf" $envAll.Values.conf.ovn_vpn_agent | b64enc }} |
Oleksandr Kozachenko | c0022be | 2023-05-23 20:36:21 +0200 | [diff] [blame] | 344 | 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 Naser | f3f59a7 | 2023-01-15 21:02:04 -0500 | [diff] [blame] | 349 | {{- 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 }} |