Ajay Lotan Thakur | efe5d8e | 2021-07-31 08:32:16 -0500 | [diff] [blame] | 1 | {{/* |
| 2 | # Copyright 2020-present Open Networking Foundation |
| 3 | |
| 4 | # SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0 |
| 5 | */}} |
| 6 | |
| 7 | {{- if .Values.config.config4g.deploy }} |
| 8 | |
| 9 | {{- if not .Values.config.useExistingConfigMap -}} |
| 10 | {{- $config4gcfg := index .Values.config.config4g.cfgFiles "webuicfg.conf" }} |
| 11 | {{- $config := index $config4gcfg "configuration" }} |
| 12 | |
| 13 | {{- if not (hasKey $config4gcfg "logger") -}} |
| 14 | {{- $_ := .Values.config.logger | set $config4gcfg "logger" -}} |
| 15 | {{- end }} |
| 16 | |
| 17 | {{- if not (hasKey $config "managedByConfigPod") -}} |
| 18 | {{- $_ := .Values.config.managedByConfigPod | set $config "managedByConfigPod" -}} |
| 19 | {{- end }} |
| 20 | |
| 21 | |
| 22 | {{- end }} |
| 23 | |
| 24 | --- |
| 25 | apiVersion: v1 |
| 26 | kind: ConfigMap |
| 27 | metadata: |
| 28 | name: config4g |
| 29 | labels: |
| 30 | {{ tuple "config4g" . | include "omec-control-plane.metadata_labels" | indent 4 }} |
| 31 | data: |
| 32 | config4g-run.sh: | |
| 33 | {{ tuple "bin/_config4g-run.sh.tpl" . | include "omec-control-plane.template" | indent 4 }} |
| 34 | {{- if not .Values.config.useExistingConfigMap -}} |
| 35 | {{- range $key, $value := .Values.config.config4g.cfgFiles }} |
| 36 | {{ $key }}: |- |
| 37 | {{ toYaml $value | indent 4 }} |
| 38 | {{- end }} |
| 39 | {{- end }} |
| 40 | {{- end }} |