Badhrinath | 987e1d8 | 2020-11-20 13:23:58 -0600 | [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.webui.deploy }} |
Hyunsun Moon | 6a65148 | 2021-02-26 01:46:44 -0800 | [diff] [blame] | 8 | |
| 9 | {{- $webuicfg := index .Values.config.webui.cfgFiles "webuicfg.conf" }} |
| 10 | {{- $config := index $webuicfg "configuration" }} |
| 11 | {{- if not (hasKey $config "mongodb") -}} |
| 12 | {{- $_ := dict "name" .Values.config.mongodb.name "url" .Values.config.mongodb.url | set $config "mongodb" -}} |
| 13 | {{- end }} |
| 14 | |
Badhrinath | 987e1d8 | 2020-11-20 13:23:58 -0600 | [diff] [blame] | 15 | --- |
| 16 | apiVersion: v1 |
| 17 | kind: ConfigMap |
| 18 | metadata: |
| 19 | name: webui |
| 20 | labels: |
| 21 | {{ tuple "webui" . | include "5g-control-plane.metadata_labels" | indent 4 }} |
| 22 | data: |
| 23 | webui-run.sh: | |
| 24 | {{ tuple "bin/_webui-run.sh.tpl" . | include "5g-control-plane.template" | indent 4 }} |
Hyunsun Moon | 6a65148 | 2021-02-26 01:46:44 -0800 | [diff] [blame] | 25 | {{- range $key, $value := .Values.config.webui.cfgFiles }} |
Badhrinath | 987e1d8 | 2020-11-20 13:23:58 -0600 | [diff] [blame] | 26 | {{ $key }}: |- |
| 27 | {{ toYaml $value | indent 4 }} |
| 28 | {{- end }} |
| 29 | {{- end }} |