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 | */}} |
Oleksandr Kozachenko | a10d785 | 2023-02-02 22:01:16 +0100 | [diff] [blame] | 14 | {{- if (.Values.global).subchart_release_name }} |
| 15 | {{- $_ := set . "deployment_name" .Chart.Name }} |
| 16 | {{- else }} |
| 17 | {{- $_ := set . "deployment_name" .Release.Name }} |
| 18 | {{- end }} |
Mohammed Naser | f3f59a7 | 2023-01-15 21:02:04 -0500 | [diff] [blame] | 19 | |
| 20 | {{- define "nova.configmap.etc" }} |
| 21 | {{- $configMapName := index . 0 }} |
| 22 | {{- $envAll := index . 1 }} |
| 23 | {{- with $envAll }} |
| 24 | |
| 25 | {{- if empty .Values.conf.nova.keystone_authtoken.auth_uri -}} |
| 26 | {{- $_ := tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" | set .Values.conf.nova.keystone_authtoken "auth_uri" -}} |
| 27 | {{- end -}} |
| 28 | {{- if empty .Values.conf.nova.keystone_authtoken.auth_url -}} |
| 29 | {{- $_ := tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" | set .Values.conf.nova.keystone_authtoken "auth_url" -}} |
| 30 | {{- end -}} |
| 31 | |
| 32 | {{- if empty .Values.conf.nova.keystone_authtoken.region_name -}} |
| 33 | {{- $_ := set .Values.conf.nova.keystone_authtoken "region_name" .Values.endpoints.identity.auth.nova.region_name -}} |
| 34 | {{- end -}} |
| 35 | {{- if empty .Values.conf.nova.keystone_authtoken.project_name -}} |
| 36 | {{- $_ := set .Values.conf.nova.keystone_authtoken "project_name" .Values.endpoints.identity.auth.nova.project_name -}} |
| 37 | {{- end -}} |
| 38 | {{- if empty .Values.conf.nova.keystone_authtoken.project_domain_name -}} |
| 39 | {{- $_ := set .Values.conf.nova.keystone_authtoken "project_domain_name" .Values.endpoints.identity.auth.nova.project_domain_name -}} |
| 40 | {{- end -}} |
| 41 | {{- if empty .Values.conf.nova.keystone_authtoken.user_domain_name -}} |
| 42 | {{- $_ := set .Values.conf.nova.keystone_authtoken "user_domain_name" .Values.endpoints.identity.auth.nova.user_domain_name -}} |
| 43 | {{- end -}} |
| 44 | {{- if empty .Values.conf.nova.keystone_authtoken.username -}} |
| 45 | {{- $_ := set .Values.conf.nova.keystone_authtoken "username" .Values.endpoints.identity.auth.nova.username -}} |
| 46 | {{- end -}} |
| 47 | {{- if empty .Values.conf.nova.keystone_authtoken.password -}} |
| 48 | {{- $_ := set .Values.conf.nova.keystone_authtoken "password" .Values.endpoints.identity.auth.nova.password -}} |
| 49 | {{- end -}} |
| 50 | |
| 51 | {{- if empty .Values.conf.nova.keystone_authtoken.memcached_servers -}} |
| 52 | {{- $_ := tuple "oslo_cache" "internal" "memcache" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" | set .Values.conf.nova.keystone_authtoken "memcached_servers" -}} |
| 53 | {{- end -}} |
| 54 | {{- if empty .Values.conf.nova.keystone_authtoken.memcache_secret_key -}} |
| 55 | {{- $_ := set .Values.conf.nova.keystone_authtoken "memcache_secret_key" ( default ( randAlphaNum 64 ) .Values.endpoints.oslo_cache.auth.memcache_secret_key ) -}} |
| 56 | {{- end -}} |
| 57 | |
| 58 | {{- if .Values.conf.nova.service_user.send_service_user_token -}} |
| 59 | |
| 60 | {{- if empty .Values.conf.nova.service_user.auth_url -}} |
| 61 | {{- $_ := tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" | set .Values.conf.nova.service_user "auth_url" -}} |
| 62 | {{- end -}} |
| 63 | {{- if empty .Values.conf.nova.service_user.region_name -}} |
| 64 | {{- $_ := set .Values.conf.nova.service_user "region_name" .Values.endpoints.identity.auth.nova.region_name -}} |
| 65 | {{- end -}} |
| 66 | {{- if empty .Values.conf.nova.service_user.project_name -}} |
| 67 | {{- $_ := set .Values.conf.nova.service_user "project_name" .Values.endpoints.identity.auth.nova.project_name -}} |
| 68 | {{- end -}} |
| 69 | {{- if empty .Values.conf.nova.service_user.project_domain_name -}} |
| 70 | {{- $_ := set .Values.conf.nova.service_user "project_domain_name" .Values.endpoints.identity.auth.nova.project_domain_name -}} |
| 71 | {{- end -}} |
| 72 | {{- if empty .Values.conf.nova.service_user.user_domain_name -}} |
| 73 | {{- $_ := set .Values.conf.nova.service_user "user_domain_name" .Values.endpoints.identity.auth.nova.user_domain_name -}} |
| 74 | {{- end -}} |
| 75 | {{- if empty .Values.conf.nova.service_user.username -}} |
| 76 | {{- $_ := set .Values.conf.nova.service_user "username" .Values.endpoints.identity.auth.nova.username -}} |
| 77 | {{- end -}} |
| 78 | {{- if empty .Values.conf.nova.service_user.password -}} |
| 79 | {{- $_ := set .Values.conf.nova.service_user "password" .Values.endpoints.identity.auth.nova.password -}} |
| 80 | {{- end -}} |
| 81 | |
| 82 | {{- end -}} |
| 83 | |
| 84 | {{- if empty .Values.conf.nova.database.connection -}} |
| 85 | {{- $connection := tuple "oslo_db" "internal" "nova" "mysql" . | include "helm-toolkit.endpoints.authenticated_endpoint_uri_lookup" -}} |
| 86 | {{- if .Values.manifests.certificates -}} |
| 87 | {{- $_ := (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.nova.database "connection" -}} |
| 88 | {{- else -}} |
| 89 | {{- $_ := set .Values.conf.nova.database "connection" $connection -}} |
| 90 | {{- end -}} |
| 91 | {{- end -}} |
| 92 | |
| 93 | {{- if empty .Values.conf.nova.api_database.connection -}} |
| 94 | {{- $connection := tuple "oslo_db_api" "internal" "nova" "mysql" . | include "helm-toolkit.endpoints.authenticated_endpoint_uri_lookup" -}} |
| 95 | {{- if .Values.manifests.certificates -}} |
| 96 | {{- $_ := (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.nova.api_database "connection" -}} |
| 97 | {{- else -}} |
| 98 | {{- $_ := set .Values.conf.nova.api_database "connection" $connection -}} |
| 99 | {{- end -}} |
| 100 | {{- end -}} |
| 101 | |
| 102 | {{- if empty .Values.conf.nova.cell0_database.connection -}} |
| 103 | {{- $connection := tuple "oslo_db_cell0" "internal" "nova" "mysql" . | include "helm-toolkit.endpoints.authenticated_endpoint_uri_lookup" -}} |
| 104 | {{- if .Values.manifests.certificates -}} |
| 105 | {{- $_ := (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.nova.cell0_database "connection" -}} |
| 106 | {{- else -}} |
| 107 | {{- $_ := set .Values.conf.nova.cell0_database "connection" $connection -}} |
| 108 | {{- end -}} |
| 109 | {{- end -}} |
| 110 | |
| 111 | {{- if empty .Values.conf.nova.DEFAULT.transport_url -}} |
| 112 | {{- $_ := tuple "oslo_messaging" "internal" "nova" "amqp" . | include "helm-toolkit.endpoints.authenticated_transport_endpoint_uri_lookup" | set .Values.conf.nova.DEFAULT "transport_url" -}} |
| 113 | {{- end -}} |
| 114 | |
| 115 | {{- if empty .Values.conf.nova.glance.api_servers -}} |
| 116 | {{- $_ := tuple "image" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" | set .Values.conf.nova.glance "api_servers" -}} |
| 117 | {{- end -}} |
| 118 | |
| 119 | {{- if empty .Values.conf.nova.neutron.url -}} |
| 120 | {{- $_ := tuple "network" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" | set .Values.conf.nova.neutron "url" -}} |
| 121 | {{- end -}} |
| 122 | |
| 123 | {{- if empty .Values.conf.nova.neutron.auth_url -}} |
| 124 | {{- $_ := tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" | set .Values.conf.nova.neutron "auth_url" -}} |
| 125 | {{- end -}} |
| 126 | |
| 127 | {{- if empty .Values.conf.nova.neutron.region_name -}} |
| 128 | {{- $_ := set .Values.conf.nova.neutron "region_name" .Values.endpoints.identity.auth.neutron.region_name -}} |
| 129 | {{- end -}} |
| 130 | {{- if empty .Values.conf.nova.neutron.project_name -}} |
| 131 | {{- $_ := set .Values.conf.nova.neutron "project_name" .Values.endpoints.identity.auth.neutron.project_name -}} |
| 132 | {{- end -}} |
| 133 | {{- if empty .Values.conf.nova.neutron.project_domain_name -}} |
| 134 | {{- $_ := set .Values.conf.nova.neutron "project_domain_name" .Values.endpoints.identity.auth.neutron.project_domain_name -}} |
| 135 | {{- end -}} |
| 136 | {{- if empty .Values.conf.nova.neutron.user_domain_name -}} |
| 137 | {{- $_ := set .Values.conf.nova.neutron "user_domain_name" .Values.endpoints.identity.auth.neutron.user_domain_name -}} |
| 138 | {{- end -}} |
| 139 | {{- if empty .Values.conf.nova.neutron.username -}} |
| 140 | {{- $_ := set .Values.conf.nova.neutron "username" .Values.endpoints.identity.auth.neutron.username -}} |
| 141 | {{- end -}} |
| 142 | {{- if empty .Values.conf.nova.neutron.password -}} |
| 143 | {{- $_ := set .Values.conf.nova.neutron "password" .Values.endpoints.identity.auth.neutron.password -}} |
| 144 | {{- end -}} |
| 145 | |
| 146 | {{- if empty .Values.conf.nova.cache.memcache_servers -}} |
| 147 | {{- $_ := tuple "oslo_cache" "internal" "memcache" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" | set .Values.conf.nova.cache "memcache_servers" -}} |
| 148 | {{- end -}} |
| 149 | |
| 150 | {{- if and (empty .Values.conf.nova.DEFAULT.metadata_host) .Values.endpoints.compute_metadata.ip.ingress -}} |
| 151 | {{- $_ := set .Values.conf.nova.DEFAULT "metadata_host" .Values.endpoints.compute_metadata.ip.ingress -}} |
| 152 | {{- end -}} |
| 153 | |
Oleksandr K. | 24c88fd | 2024-12-08 22:28:50 -0800 | [diff] [blame] | 154 | {{- if empty .Values.conf.nova.DEFAULT.metadata_listen_port -}} |
| 155 | {{- $_ := tuple "compute_metadata" "internal" "metadata" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | set .Values.conf.nova.DEFAULT "metadata_listen_port" -}} |
Mohammed Naser | f3f59a7 | 2023-01-15 21:02:04 -0500 | [diff] [blame] | 156 | {{- end -}} |
| 157 | |
| 158 | {{- if empty .Values.conf.nova.placement.auth_url -}} |
| 159 | {{- $_ := tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup"| set .Values.conf.nova.placement "auth_url" -}} |
| 160 | {{- end -}} |
| 161 | |
| 162 | {{- if empty .Values.conf.nova.placement.region_name -}} |
| 163 | {{- $_ := set .Values.conf.nova.placement "region_name" .Values.endpoints.identity.auth.placement.region_name -}} |
| 164 | {{- end -}} |
| 165 | {{- if empty .Values.conf.nova.placement.project_name -}} |
| 166 | {{- $_ := set .Values.conf.nova.placement "project_name" .Values.endpoints.identity.auth.placement.project_name -}} |
| 167 | {{- end -}} |
| 168 | {{- if empty .Values.conf.nova.placement.project_domain_name -}} |
| 169 | {{- $_ := set .Values.conf.nova.placement "project_domain_name" .Values.endpoints.identity.auth.placement.project_domain_name -}} |
| 170 | {{- end -}} |
| 171 | {{- if empty .Values.conf.nova.placement.user_domain_name -}} |
| 172 | {{- $_ := set .Values.conf.nova.placement "user_domain_name" .Values.endpoints.identity.auth.placement.user_domain_name -}} |
| 173 | {{- end -}} |
| 174 | {{- if empty .Values.conf.nova.placement.username -}} |
| 175 | {{- $_ := set .Values.conf.nova.placement "username" .Values.endpoints.identity.auth.placement.username -}} |
| 176 | {{- end -}} |
| 177 | {{- if empty .Values.conf.nova.placement.password -}} |
| 178 | {{- $_ := set .Values.conf.nova.placement "password" .Values.endpoints.identity.auth.placement.password -}} |
| 179 | {{- end -}} |
| 180 | |
| 181 | {{- if eq .Values.console.console_kind "novnc"}} |
| 182 | {{- $_ := "true" | set .Values.conf.nova.vnc "enabled" -}} |
| 183 | {{- if empty .Values.conf.nova.vnc.novncproxy_base_url -}} |
| 184 | {{- $_ := tuple "compute_novnc_proxy" "public" "novnc_proxy" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" | set .Values.conf.nova.vnc "novncproxy_base_url" -}} |
| 185 | {{- end -}} |
| 186 | {{- if empty .Values.conf.nova.vnc.novncproxy_port -}} |
| 187 | {{- $_ := tuple "compute_novnc_proxy" "internal" "novnc_proxy" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | set .Values.conf.nova.vnc "novncproxy_port" -}} |
| 188 | {{- end -}} |
| 189 | {{- end -}} |
| 190 | |
okozachenko1203 | ea639e7 | 2023-08-30 23:25:38 +1000 | [diff] [blame] | 191 | {{- if (contains "vencrypt" .Values.conf.nova.vnc.auth_schemes) -}} |
| 192 | {{- if empty .Values.conf.nova.vnc.vencrypt_client_key }} |
| 193 | {{- $_ := set $envAll.Values.conf.nova.vnc "vencrypt_client_key" "/etc/pki/nova-novncproxy/tls.key" -}} |
| 194 | {{- end }} |
| 195 | {{- if empty .Values.conf.nova.vnc.vencrypt_client_cert }} |
| 196 | {{- $_ := set $envAll.Values.conf.nova.vnc "vencrypt_client_cert" "/etc/pki/nova-novncproxy/tls.crt" -}} |
| 197 | {{- end }} |
| 198 | {{- if empty .Values.conf.nova.vnc.vencrypt_ca_certs }} |
| 199 | {{- $_ := set $envAll.Values.conf.nova.vnc "vencrypt_ca_certs" "/etc/pki/nova-novncproxy/ca.crt" -}} |
| 200 | {{- end }} |
| 201 | {{- end }} |
| 202 | |
Mohammed Naser | f3f59a7 | 2023-01-15 21:02:04 -0500 | [diff] [blame] | 203 | {{- if eq .Values.console.console_kind "spice"}} |
| 204 | {{- $_ := "false" | set .Values.conf.nova.vnc "enabled" -}} |
| 205 | {{- $_ := "true" | set .Values.conf.nova.spice "enabled" -}} |
| 206 | {{- if empty .Values.conf.nova.spice.html5proxy_base_url -}} |
| 207 | {{- $_ := tuple "compute_spice_proxy" "public" "spice_proxy" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" | set .Values.conf.nova.spice "html5proxy_base_url" -}} |
| 208 | {{- end -}} |
| 209 | {{- if empty .Values.conf.nova.spice.html5proxy_port -}} |
| 210 | {{- $_ := tuple "compute_spice_proxy" "internal" "spice_proxy" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | set .Values.conf.nova.spice "html5proxy_port" -}} |
| 211 | {{- end -}} |
| 212 | {{- end -}} |
| 213 | |
| 214 | {{- if empty .Values.conf.nova.ironic.api_endpoint -}} |
| 215 | {{- $_ := tuple "baremetal" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" | set .Values.conf.nova.ironic "api_endpoint" -}} |
| 216 | {{- end -}} |
| 217 | |
| 218 | {{- if empty .Values.conf.nova.ironic.auth_url -}} |
| 219 | {{- $_ := tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" | set .Values.conf.nova.ironic "auth_url" -}} |
| 220 | {{- end -}} |
| 221 | |
| 222 | {{- if empty .Values.conf.nova.ironic.region_name -}} |
| 223 | {{- $_ := set .Values.conf.nova.ironic "region_name" .Values.endpoints.identity.auth.ironic.region_name -}} |
| 224 | {{- end -}} |
| 225 | {{- if empty .Values.conf.nova.ironic.project_name -}} |
| 226 | {{- $_ := set .Values.conf.nova.ironic "project_name" .Values.endpoints.identity.auth.ironic.project_name -}} |
| 227 | {{- end -}} |
| 228 | {{- if empty .Values.conf.nova.ironic.project_domain_name -}} |
| 229 | {{- $_ := set .Values.conf.nova.ironic "project_domain_name" .Values.endpoints.identity.auth.ironic.project_domain_name -}} |
| 230 | {{- end -}} |
| 231 | {{- if empty .Values.conf.nova.ironic.user_domain_name -}} |
| 232 | {{- $_ := set .Values.conf.nova.ironic "user_domain_name" .Values.endpoints.identity.auth.ironic.user_domain_name -}} |
| 233 | {{- end -}} |
| 234 | {{- if empty .Values.conf.nova.ironic.username -}} |
| 235 | {{- $_ := set .Values.conf.nova.ironic "username" .Values.endpoints.identity.auth.ironic.username -}} |
| 236 | {{- end -}} |
| 237 | {{- if empty .Values.conf.nova.ironic.password -}} |
| 238 | {{- $_ := set .Values.conf.nova.ironic "password" .Values.endpoints.identity.auth.ironic.password -}} |
| 239 | {{- end -}} |
| 240 | {{- if empty .Values.conf.nova.ironic.auth_type -}} |
| 241 | {{- $_ := set .Values.conf.nova.ironic "auth_type" .Values.endpoints.identity.auth.ironic.auth_type -}} |
| 242 | {{- end -}} |
| 243 | {{- if empty .Values.conf.nova.ironic.auth_version -}} |
| 244 | {{- $_ := set .Values.conf.nova.ironic "auth_version" .Values.endpoints.identity.auth.ironic.auth_version -}} |
| 245 | {{- end -}} |
| 246 | |
| 247 | {{- if empty .Values.conf.nova.ironic.memcache_secret_key -}} |
| 248 | {{- $_ := (default (randAlphaNum 64) .Values.endpoints.oslo_cache.auth.memcache_secret_key) | set .Values.conf.nova.ironic "memcache_secret_key" -}} |
| 249 | {{- end -}} |
| 250 | |
| 251 | {{- if empty .Values.conf.nova.ironic.memcache_servers -}} |
| 252 | {{- $_ := tuple "oslo_cache" "internal" "memcache" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" | set .Values.conf.nova.ironic "memcache_servers" -}} |
| 253 | {{- end -}} |
| 254 | |
Rico Lin | 885c515 | 2023-11-02 01:28:20 +0800 | [diff] [blame] | 255 | {{- if .Values.conf.nova.cinder.auth_type -}} |
| 256 | {{- if eq .Values.conf.nova.cinder.auth_type "password" -}} |
| 257 | |
okozachenko1203 | 567fc08 | 2023-08-21 22:50:02 +1000 | [diff] [blame] | 258 | {{- if empty .Values.conf.nova.cinder.auth_url -}} |
| 259 | {{- $_ := tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" | set .Values.conf.nova.cinder "auth_url" -}} |
| 260 | {{- end -}} |
| 261 | |
| 262 | {{- if empty .Values.conf.nova.cinder.os_region_name -}} |
| 263 | {{- $_ := set .Values.conf.nova.cinder "os_region_name" .Values.endpoints.identity.auth.cinder.region_name -}} |
| 264 | {{- end -}} |
| 265 | {{- if empty .Values.conf.nova.cinder.project_name -}} |
| 266 | {{- $_ := set .Values.conf.nova.cinder "project_name" .Values.endpoints.identity.auth.cinder.project_name -}} |
| 267 | {{- end -}} |
| 268 | {{- if empty .Values.conf.nova.cinder.project_domain_name -}} |
| 269 | {{- $_ := set .Values.conf.nova.cinder "project_domain_name" .Values.endpoints.identity.auth.cinder.project_domain_name -}} |
| 270 | {{- end -}} |
| 271 | {{- if empty .Values.conf.nova.cinder.user_domain_name -}} |
| 272 | {{- $_ := set .Values.conf.nova.cinder "user_domain_name" .Values.endpoints.identity.auth.cinder.user_domain_name -}} |
| 273 | {{- end -}} |
| 274 | {{- if empty .Values.conf.nova.cinder.username -}} |
| 275 | {{- $_ := set .Values.conf.nova.cinder "username" .Values.endpoints.identity.auth.cinder.username -}} |
| 276 | {{- end -}} |
| 277 | {{- if empty .Values.conf.nova.cinder.password -}} |
| 278 | {{- $_ := set .Values.conf.nova.cinder "password" .Values.endpoints.identity.auth.cinder.password -}} |
| 279 | {{- end -}} |
| 280 | |
Rico Lin | 885c515 | 2023-11-02 01:28:20 +0800 | [diff] [blame] | 281 | {{- end -}} |
| 282 | {{- end -}} |
| 283 | |
Mohammed Naser | f3f59a7 | 2023-01-15 21:02:04 -0500 | [diff] [blame] | 284 | {{- if empty .Values.conf.nova.DEFAULT.osapi_compute_listen_port -}} |
Oleksandr Kozachenko | a10d785 | 2023-02-02 22:01:16 +0100 | [diff] [blame] | 285 | {{- $_ := tuple "compute" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | set .Values.conf.nova.DEFAULT "osapi_compute_listen_port" -}} |
Mohammed Naser | f3f59a7 | 2023-01-15 21:02:04 -0500 | [diff] [blame] | 286 | {{- end -}} |
| 287 | |
Mohammed Naser | 6924725 | 2023-09-26 22:23:46 -0400 | [diff] [blame] | 288 | {{- if empty .Values.conf.nova_api_uwsgi.uwsgi.processes -}} |
| 289 | {{- $_ := set .Values.conf.nova_api_uwsgi.uwsgi "processes" .Values.conf.nova.DEFAULT.osapi_compute_workers -}} |
| 290 | {{- end -}} |
| 291 | {{- if empty (index .Values.conf.nova_api_uwsgi.uwsgi "http-socket") -}} |
| 292 | {{- $http_socket_port := tuple "compute" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | toString }} |
| 293 | {{- $http_socket := printf "0.0.0.0:%s" $http_socket_port }} |
| 294 | {{- $_ := set .Values.conf.nova_api_uwsgi.uwsgi "http-socket" $http_socket -}} |
| 295 | {{- end -}} |
| 296 | |
| 297 | {{- if empty .Values.conf.nova_metadata_uwsgi.uwsgi.processes -}} |
| 298 | {{- $_ := set .Values.conf.nova_metadata_uwsgi.uwsgi "processes" .Values.conf.nova.DEFAULT.metadata_workers -}} |
| 299 | {{- end -}} |
| 300 | {{- if empty (index .Values.conf.nova_metadata_uwsgi.uwsgi "http-socket") -}} |
| 301 | {{- $http_socket_port := .Values.network.metadata.port | toString }} |
| 302 | {{- $http_socket := printf "0.0.0.0:%s" $http_socket_port }} |
| 303 | {{- $_ := set .Values.conf.nova_metadata_uwsgi.uwsgi "http-socket" $http_socket -}} |
| 304 | {{- end -}} |
| 305 | |
Mohammed Naser | f3f59a7 | 2023-01-15 21:02:04 -0500 | [diff] [blame] | 306 | {{- if and (empty .Values.conf.logging.handler_fluent) (has "fluent" .Values.conf.logging.handlers.keys) -}} |
| 307 | {{- $fluentd_host := tuple "fluentd" "internal" $envAll | include "helm-toolkit.endpoints.hostname_namespaced_endpoint_lookup" }} |
| 308 | {{- $fluentd_port := tuple "fluentd" "internal" "service" $envAll | include "helm-toolkit.endpoints.endpoint_port_lookup" }} |
Oleksandr Kozachenko | a10d785 | 2023-02-02 22:01:16 +0100 | [diff] [blame] | 309 | {{- $fluent_args := printf "('%s.%s', '%s', %s)" .Release.Namespace .deployment_name $fluentd_host $fluentd_port }} |
Mohammed Naser | f3f59a7 | 2023-01-15 21:02:04 -0500 | [diff] [blame] | 310 | {{- $handler_fluent := dict "class" "fluent.handler.FluentHandler" "formatter" "fluent" "args" $fluent_args -}} |
| 311 | {{- $_ := set .Values.conf.logging "handler_fluent" $handler_fluent -}} |
| 312 | {{- end -}} |
| 313 | |
| 314 | {{- if and (empty .Values.conf.logging.formatter_fluent) (has "fluent" .Values.conf.logging.formatters.keys) -}} |
| 315 | {{- $formatter_fluent := dict "class" "oslo_log.formatters.FluentFormatter" -}} |
| 316 | {{- $_ := set .Values.conf.logging "formatter_fluent" $formatter_fluent -}} |
| 317 | {{- end -}} |
| 318 | |
| 319 | {{ $__nova_compute := dict }} |
| 320 | {{ $_ := set $__nova_compute "config" .Values.conf.nova }} |
| 321 | {{ range .Values.conf.nova_compute_redactions }} |
| 322 | {{ $_ := set $__nova_compute "config" (omit $__nova_compute.config .) }} |
| 323 | {{ end }} |
| 324 | --- |
| 325 | apiVersion: v1 |
| 326 | kind: Secret |
| 327 | metadata: |
| 328 | name: {{ $configMapName }} |
| 329 | type: Opaque |
| 330 | data: |
| 331 | rally_tests.yaml: {{ toYaml .Values.conf.rally_tests.tests | b64enc }} |
| 332 | api-paste.ini: {{ include "helm-toolkit.utils.to_oslo_conf" .Values.conf.paste | b64enc }} |
| 333 | policy.yaml: {{ toYaml .Values.conf.policy | b64enc }} |
| 334 | nova_sudoers: {{ $envAll.Values.conf.nova_sudoers | b64enc }} |
| 335 | rootwrap.conf: {{ .Values.conf.rootwrap | b64enc }} |
| 336 | {{- range $key, $value := $envAll.Values.conf.rootwrap_filters }} |
| 337 | {{- $filePrefix := replace "_" "-" $key }} |
| 338 | {{ printf "%s.filters" $filePrefix }}: {{ $value.content | b64enc }} |
| 339 | {{- end }} |
| 340 | nova.conf: {{ include "helm-toolkit.utils.to_oslo_conf" .Values.conf.nova | b64enc }} |
| 341 | nova-compute.conf: {{ include "helm-toolkit.utils.to_oslo_conf" $__nova_compute.config | b64enc }} |
| 342 | logging.conf: {{ include "helm-toolkit.utils.to_oslo_conf" .Values.conf.logging | b64enc }} |
| 343 | api_audit_map.conf: {{ include "helm-toolkit.utils.to_oslo_conf" .Values.conf.api_audit_map | b64enc }} |
| 344 | nova-ironic.conf: {{ include "helm-toolkit.utils.to_oslo_conf" .Values.conf.nova_ironic | b64enc }} |
Mohammed Naser | 6924725 | 2023-09-26 22:23:46 -0400 | [diff] [blame] | 345 | nova-api-uwsgi.ini: {{ include "helm-toolkit.utils.to_oslo_conf" .Values.conf.nova_api_uwsgi | b64enc }} |
| 346 | nova-metadata-uwsgi.ini: {{ include "helm-toolkit.utils.to_oslo_conf" .Values.conf.nova_metadata_uwsgi | b64enc }} |
Mohammed Naser | f3f59a7 | 2023-01-15 21:02:04 -0500 | [diff] [blame] | 347 | {{- if .Values.manifests.certificates }} |
| 348 | {{- include "helm-toolkit.snippets.values_template_renderer" (dict "envAll" $envAll "template" .Values.conf.mpm_event "key" "mpm_event.conf" "format" "Secret" ) | indent 2 }} |
| 349 | {{- include "helm-toolkit.snippets.values_template_renderer" (dict "envAll" $envAll "template" .Values.conf.wsgi_nova_api "key" "wsgi-api.conf" "format" "Secret" ) | indent 2 }} |
| 350 | {{- include "helm-toolkit.snippets.values_template_renderer" (dict "envAll" $envAll "template" .Values.conf.wsgi_nova_metadata "key" "wsgi-metadata.conf" "format" "Secret" ) | indent 2 }} |
| 351 | {{- end }} |
| 352 | {{- if .Values.conf.security }} |
| 353 | {{- include "helm-toolkit.snippets.values_template_renderer" (dict "envAll" $envAll "template" .Values.conf.security "key" "security.conf" "format" "Secret" ) | indent 2 }} |
| 354 | {{- end }} |
| 355 | {{- end }} |
| 356 | {{- end }} |
| 357 | {{- if .Values.manifests.configmap_etc }} |
| 358 | {{- list "nova-etc" . | include "nova.configmap.etc" }} |
| 359 | {{- end }} |