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 | |
Mohammed Naser | bcdd25c | 2023-01-18 03:38:47 +0000 | [diff] [blame] | 15 | {{- if (.Values.global).subchart_release_name }} |
| 16 | {{- $_ := set . "deployment_name" .Chart.Name }} |
| 17 | {{- else }} |
| 18 | {{- $_ := set . "deployment_name" .Release.Name }} |
| 19 | {{- end }} |
| 20 | |
Mohammed Naser | f3f59a7 | 2023-01-15 21:02:04 -0500 | [diff] [blame] | 21 | {{- if .Values.manifests.configmap_etc }} |
| 22 | {{- $envAll := . }} |
| 23 | |
| 24 | {{- if empty .Values.conf.heat.keystone_authtoken.auth_uri -}} |
| 25 | {{- $_ := tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup"| set .Values.conf.heat.keystone_authtoken "auth_uri" -}} |
| 26 | {{- end -}} |
| 27 | |
| 28 | {{- if empty .Values.conf.heat.keystone_authtoken.auth_url -}} |
| 29 | {{- $_ := tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup"| set .Values.conf.heat.keystone_authtoken "auth_url" -}} |
| 30 | {{- end -}} |
| 31 | |
| 32 | {{- if empty .Values.conf.heat.keystone_authtoken.region_name -}} |
| 33 | {{- $_ := set .Values.conf.heat.keystone_authtoken "region_name" .Values.endpoints.identity.auth.heat.region_name -}} |
| 34 | {{- end -}} |
| 35 | {{- if empty .Values.conf.heat.keystone_authtoken.project_name -}} |
| 36 | {{- $_ := set .Values.conf.heat.keystone_authtoken "project_name" .Values.endpoints.identity.auth.heat.project_name -}} |
| 37 | {{- end -}} |
| 38 | {{- if empty .Values.conf.heat.keystone_authtoken.project_domain_name -}} |
| 39 | {{- $_ := set .Values.conf.heat.keystone_authtoken "project_domain_name" .Values.endpoints.identity.auth.heat.project_domain_name -}} |
| 40 | {{- end -}} |
| 41 | {{- if empty .Values.conf.heat.keystone_authtoken.user_domain_name -}} |
| 42 | {{- $_ := set .Values.conf.heat.keystone_authtoken "user_domain_name" .Values.endpoints.identity.auth.heat.user_domain_name -}} |
| 43 | {{- end -}} |
| 44 | {{- if empty .Values.conf.heat.keystone_authtoken.username -}} |
| 45 | {{- $_ := set .Values.conf.heat.keystone_authtoken "username" .Values.endpoints.identity.auth.heat.username -}} |
| 46 | {{- end -}} |
| 47 | {{- if empty .Values.conf.heat.keystone_authtoken.password -}} |
| 48 | {{- $_ := set .Values.conf.heat.keystone_authtoken "password" .Values.endpoints.identity.auth.heat.password -}} |
| 49 | {{- end -}} |
| 50 | |
| 51 | {{- if empty .Values.conf.heat.trustee.region_name -}} |
| 52 | {{- $_ := set .Values.conf.heat.trustee "region_name" .Values.endpoints.identity.auth.heat_trustee.region_name -}} |
| 53 | {{- end -}} |
| 54 | {{- if empty .Values.conf.heat.trustee.user_domain_name -}} |
| 55 | {{- $_ := set .Values.conf.heat.trustee "user_domain_name" .Values.endpoints.identity.auth.heat_trustee.user_domain_name -}} |
| 56 | {{- end -}} |
| 57 | {{- if empty .Values.conf.heat.trustee.username -}} |
| 58 | {{- $_ := set .Values.conf.heat.trustee "username" .Values.endpoints.identity.auth.heat_trustee.username -}} |
| 59 | {{- end -}} |
| 60 | {{- if empty .Values.conf.heat.trustee.password -}} |
| 61 | {{- $_ := set .Values.conf.heat.trustee "password" .Values.endpoints.identity.auth.heat_trustee.password -}} |
| 62 | {{- end -}} |
| 63 | |
| 64 | {{- if empty .Values.conf.heat.DEFAULT.stack_user_domain_name -}} |
| 65 | {{- $_ := set .Values.conf.heat.DEFAULT "stack_user_domain_name" .Values.endpoints.identity.auth.heat_stack_user.domain_name -}} |
| 66 | {{- end -}} |
| 67 | {{- if empty .Values.conf.heat.DEFAULT.stack_domain_admin -}} |
| 68 | {{- $_ := set .Values.conf.heat.DEFAULT "stack_domain_admin" .Values.endpoints.identity.auth.heat_stack_user.username -}} |
| 69 | {{- end -}} |
| 70 | {{- if empty .Values.conf.heat.DEFAULT.stack_domain_admin_password -}} |
| 71 | {{- $_ := set .Values.conf.heat.DEFAULT "stack_domain_admin_password" .Values.endpoints.identity.auth.heat_stack_user.password -}} |
| 72 | {{- end -}} |
| 73 | |
| 74 | {{- if empty .Values.conf.heat.keystone_authtoken.memcached_servers -}} |
| 75 | {{- $_ := tuple "oslo_cache" "internal" "memcache" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" | set .Values.conf.heat.keystone_authtoken "memcached_servers" -}} |
| 76 | {{- end -}} |
| 77 | {{- if empty .Values.conf.heat.keystone_authtoken.memcache_secret_key -}} |
| 78 | {{- $_ := set .Values.conf.heat.keystone_authtoken "memcache_secret_key" ( default ( randAlphaNum 64 ) .Values.endpoints.oslo_cache.auth.memcache_secret_key ) -}} |
| 79 | {{- end -}} |
| 80 | |
| 81 | {{- if empty .Values.conf.heat.database.connection -}} |
| 82 | {{- $connection := tuple "oslo_db" "internal" "heat" "mysql" . | include "helm-toolkit.endpoints.authenticated_endpoint_uri_lookup" -}} |
| 83 | {{- if .Values.manifests.certificates -}} |
| 84 | {{- $_ := (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.heat.database "connection" -}} |
| 85 | {{- else -}} |
| 86 | {{- $_ := set .Values.conf.heat.database "connection" $connection -}} |
| 87 | {{- end -}} |
| 88 | {{- end -}} |
| 89 | |
| 90 | {{- if empty .Values.conf.heat.DEFAULT.transport_url -}} |
| 91 | {{- $_ := tuple "oslo_messaging" "internal" "heat" "amqp" . | include "helm-toolkit.endpoints.authenticated_transport_endpoint_uri_lookup" | set .Values.conf.heat.DEFAULT "transport_url" -}} |
| 92 | {{- end -}} |
| 93 | |
| 94 | {{- if empty .Values.conf.heat.DEFAULT.heat_metadata_server_url -}} |
| 95 | {{- $_ := tuple "cloudformation" "public" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" | trimSuffix .Values.endpoints.cloudformation.path.default | set .Values.conf.heat.DEFAULT "heat_metadata_server_url" -}} |
| 96 | {{- end -}} |
| 97 | |
| 98 | {{- if empty .Values.conf.heat.DEFAULT.heat_waitcondition_server_url -}} |
| 99 | {{- $_ := cat (tuple "cloudformation" "public" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup") "waitcondition" | replace " " "/" | set .Values.conf.heat.DEFAULT "heat_waitcondition_server_url" -}} |
| 100 | {{- end -}} |
| 101 | |
| 102 | {{- if empty .Values.conf.heat.DEFAULT.heat_watch_server_url -}} |
| 103 | {{- $_ := tuple "cloudwatch" "public" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" | trimSuffix "/" | set .Values.conf.heat.DEFAULT "heat_watch_server_url" -}} |
| 104 | {{- end -}} |
| 105 | |
| 106 | {{- if empty .Values.conf.heat.clients_keystone.auth_uri -}} |
| 107 | {{- $_ := tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" | trimSuffix .Values.endpoints.identity.path.default | set .Values.conf.heat.clients_keystone "auth_uri" -}} |
| 108 | {{- end -}} |
| 109 | |
| 110 | {{- if empty .Values.conf.heat.trustee.auth_url -}} |
| 111 | {{- $_ := tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" | trimSuffix .Values.endpoints.identity.path.default | set .Values.conf.heat.trustee "auth_url" -}} |
| 112 | {{- end -}} |
| 113 | |
| 114 | {{- if empty .Values.conf.heat.heat_api.bind_port -}} |
Mohammed Naser | bcdd25c | 2023-01-18 03:38:47 +0000 | [diff] [blame] | 115 | {{- $_ := tuple "orchestration" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | set .Values.conf.heat.heat_api "bind_port" -}} |
Mohammed Naser | f3f59a7 | 2023-01-15 21:02:04 -0500 | [diff] [blame] | 116 | {{- end -}} |
| 117 | |
| 118 | {{- if empty .Values.conf.heat.heat_api_cloudwatch.bind_port -}} |
Mohammed Naser | bcdd25c | 2023-01-18 03:38:47 +0000 | [diff] [blame] | 119 | {{- $_ := tuple "cloudwatch" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | set .Values.conf.heat.heat_api_cloudwatch "bind_port" -}} |
Mohammed Naser | f3f59a7 | 2023-01-15 21:02:04 -0500 | [diff] [blame] | 120 | {{- end -}} |
| 121 | |
| 122 | {{- if empty .Values.conf.heat.heat_api_cfn.bind_port -}} |
Mohammed Naser | bcdd25c | 2023-01-18 03:38:47 +0000 | [diff] [blame] | 123 | {{- $_ := tuple "cloudformation" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | set .Values.conf.heat.heat_api_cfn "bind_port" -}} |
Mohammed Naser | f3f59a7 | 2023-01-15 21:02:04 -0500 | [diff] [blame] | 124 | {{- end -}} |
| 125 | |
Oleksandr Kozachenko | 92a39f1 | 2023-10-03 15:25:15 +0200 | [diff] [blame] | 126 | {{- if empty .Values.conf.heat_api_uwsgi.uwsgi.processes -}} |
| 127 | {{- $_ := set .Values.conf.heat_api_uwsgi.uwsgi "processes" .Values.conf.heat.heat_api.workers -}} |
| 128 | {{- end -}} |
| 129 | {{- if empty (index .Values.conf.heat_api_uwsgi.uwsgi "http-socket") -}} |
| 130 | {{- $http_socket_port := tuple "orchestration" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | toString }} |
| 131 | {{- $http_socket := printf "0.0.0.0:%s" $http_socket_port }} |
| 132 | {{- $_ := set .Values.conf.heat_api_uwsgi.uwsgi "http-socket" $http_socket -}} |
| 133 | {{- end -}} |
| 134 | |
| 135 | {{- if empty .Values.conf.heat_api_cfn_uwsgi.uwsgi.processes -}} |
| 136 | {{- $_ := set .Values.conf.heat_api_cfn_uwsgi.uwsgi "processes" .Values.conf.heat.heat_api_cfn.workers -}} |
| 137 | {{- end -}} |
| 138 | {{- if empty (index .Values.conf.heat_api_cfn_uwsgi.uwsgi "http-socket") -}} |
| 139 | {{- $http_socket_port := tuple "cloudformation" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | toString }} |
| 140 | {{- $http_socket := printf "0.0.0.0:%s" $http_socket_port }} |
| 141 | {{- $_ := set .Values.conf.heat_api_cfn_uwsgi.uwsgi "http-socket" $http_socket -}} |
| 142 | {{- end -}} |
| 143 | |
Mohammed Naser | f3f59a7 | 2023-01-15 21:02:04 -0500 | [diff] [blame] | 144 | {{- if and (empty .Values.conf.logging.handler_fluent) (has "fluent" .Values.conf.logging.handlers.keys) -}} |
| 145 | {{- $fluentd_host := tuple "fluentd" "internal" $envAll | include "helm-toolkit.endpoints.hostname_namespaced_endpoint_lookup" }} |
| 146 | {{- $fluentd_port := tuple "fluentd" "internal" "service" $envAll | include "helm-toolkit.endpoints.endpoint_port_lookup" }} |
Mohammed Naser | bcdd25c | 2023-01-18 03:38:47 +0000 | [diff] [blame] | 147 | {{- $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] | 148 | {{- $handler_fluent := dict "class" "fluent.handler.FluentHandler" "formatter" "fluent" "args" $fluent_args -}} |
| 149 | {{- $_ := set .Values.conf.logging "handler_fluent" $handler_fluent -}} |
| 150 | {{- end -}} |
| 151 | |
| 152 | {{- if and (empty .Values.conf.logging.formatter_fluent) (has "fluent" .Values.conf.logging.formatters.keys) -}} |
| 153 | {{- $formatter_fluent := dict "class" "oslo_log.formatters.FluentFormatter" -}} |
| 154 | {{- $_ := set .Values.conf.logging "formatter_fluent" $formatter_fluent -}} |
| 155 | {{- end -}} |
| 156 | --- |
| 157 | apiVersion: v1 |
| 158 | kind: Secret |
| 159 | metadata: |
| 160 | name: heat-etc |
| 161 | type: Opaque |
| 162 | data: |
| 163 | rally_tests.yaml: {{ toYaml .Values.conf.rally_tests.tests | b64enc }} |
| 164 | heat.conf: {{ include "helm-toolkit.utils.to_oslo_conf" .Values.conf.heat | b64enc }} |
Oleksandr Kozachenko | 92a39f1 | 2023-10-03 15:25:15 +0200 | [diff] [blame] | 165 | heat-api-uwsgi.ini: {{ include "helm-toolkit.utils.to_oslo_conf" .Values.conf.heat_api_uwsgi | b64enc }} |
| 166 | heat-api-cfn-uwsgi.ini: {{ include "helm-toolkit.utils.to_oslo_conf" .Values.conf.heat_api_cfn_uwsgi | b64enc }} |
Mohammed Naser | f3f59a7 | 2023-01-15 21:02:04 -0500 | [diff] [blame] | 167 | logging.conf: {{ include "helm-toolkit.utils.to_oslo_conf" .Values.conf.logging | b64enc }} |
| 168 | api-paste.ini: {{ include "helm-toolkit.utils.to_ini" .Values.conf.paste | b64enc }} |
Mohammed Naser | f3f59a7 | 2023-01-15 21:02:04 -0500 | [diff] [blame] | 169 | policy.yaml: {{ toYaml .Values.conf.policy | b64enc }} |
| 170 | {{- if .Values.manifests.certificates }} |
| 171 | {{- include "helm-toolkit.snippets.values_template_renderer" (dict "envAll" $envAll "template" .Values.conf.mpm_event "key" "mpm_event.conf" "format" "Secret" ) | indent 2 }} |
| 172 | {{- include "helm-toolkit.snippets.values_template_renderer" (dict "envAll" $envAll "template" .Values.conf.wsgi_heat "key" "wsgi-heat.conf" "format" "Secret" ) | indent 2 }} |
| 173 | {{- include "helm-toolkit.snippets.values_template_renderer" (dict "envAll" $envAll "template" .Values.conf.wsgi_cfn "key" "wsgi-cnf.conf" "format" "Secret" ) | indent 2 }} |
| 174 | {{- end }} |
| 175 | api_audit_map.conf: {{ include "helm-toolkit.utils.to_oslo_conf" .Values.conf.api_audit_map | b64enc }} |
| 176 | {{- range $key, $value := $envAll.Values.conf.rally_tests.templates }} |
| 177 | {{ printf "test_template_%d" $key }}: {{ $value.template | b64enc }} |
| 178 | {{- end }} |
| 179 | {{- end }} |