Mohammed Naser | 54ee992 | 2023-07-22 18:40:25 +0000 | [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 | {{- define "ovn.configmap.etc" }} |
| 16 | {{- $configMapName := index . 0 }} |
| 17 | {{- $envAll := index . 1 }} |
| 18 | {{- with $envAll }} |
| 19 | |
Oleksandr K | df7761d | 2024-07-11 03:47:59 +0200 | [diff] [blame] | 20 | {{- if empty (index .Values.conf.ovn_network_logging_parser_uwsgi.uwsgi "http-socket") -}} |
| 21 | {{- $http_socket_port := tuple "ovn_logging_parser" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | toString }} |
| 22 | {{- $http_socket := printf "0.0.0.0:%s" $http_socket_port }} |
| 23 | {{- $_ := set .Values.conf.ovn_network_logging_parser_uwsgi.uwsgi "http-socket" $http_socket -}} |
| 24 | {{- end -}} |
| 25 | |
Mohammed Naser | 54ee992 | 2023-07-22 18:40:25 +0000 | [diff] [blame] | 26 | --- |
| 27 | apiVersion: v1 |
| 28 | kind: Secret |
| 29 | metadata: |
| 30 | name: {{ $configMapName }} |
| 31 | type: Opaque |
| 32 | data: |
| 33 | auto_bridge_add: {{ toJson $envAll.Values.conf.auto_bridge_add | b64enc }} |
Oleksandr K | df7761d | 2024-07-11 03:47:59 +0200 | [diff] [blame] | 34 | neutron-ovn-network-logging-parser-uwsgi.ini: {{ include "helm-toolkit.utils.to_oslo_conf" .Values.conf.ovn_network_logging_parser_uwsgi | b64enc }} |
Mohammed Naser | 54ee992 | 2023-07-22 18:40:25 +0000 | [diff] [blame] | 35 | {{- end }} |
| 36 | {{- end }} |
| 37 | |
| 38 | {{- if .Values.manifests.configmap_etc }} |
| 39 | {{- list "ovn-etc" . | include "ovn.configmap.etc" }} |
| 40 | {{- end }} |