blob: f4581c3120713857ae9aa948422707b534e2466a [file] [log] [blame]
Badhrinath987e1d82020-11-20 13:23:58 -06001{{/*
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 Moon6a651482021-02-26 01:46:44 -08008
Hyunsun Moonc73636b2021-03-24 15:47:08 -07009{{- if not .Values.config.useExistingConfigMap -}}
Hyunsun Moon6a651482021-02-26 01:46:44 -080010{{- $webuicfg := index .Values.config.webui.cfgFiles "webuicfg.conf" }}
11{{- $config := index $webuicfg "configuration" }}
12{{- if not (hasKey $config "mongodb") -}}
13{{- $_ := dict "name" .Values.config.mongodb.name "url" .Values.config.mongodb.url | set $config "mongodb" -}}
14{{- end }}
Hyunsun Moonc73636b2021-03-24 15:47:08 -070015{{- end }}
Hyunsun Moon6a651482021-02-26 01:46:44 -080016
Badhrinath987e1d82020-11-20 13:23:58 -060017---
18apiVersion: v1
19kind: ConfigMap
20metadata:
21 name: webui
22 labels:
23{{ tuple "webui" . | include "5g-control-plane.metadata_labels" | indent 4 }}
24data:
25 webui-run.sh: |
26{{ tuple "bin/_webui-run.sh.tpl" . | include "5g-control-plane.template" | indent 4 }}
Hyunsun Moonc73636b2021-03-24 15:47:08 -070027{{- if not .Values.config.useExistingConfigMap -}}
Hyunsun Moon6a651482021-02-26 01:46:44 -080028{{- range $key, $value := .Values.config.webui.cfgFiles }}
Badhrinath987e1d82020-11-20 13:23:58 -060029 {{ $key }}: |-
30{{ toYaml $value | indent 4 }}
31{{- end }}
32{{- end }}
Hyunsun Moonc73636b2021-03-24 15:47:08 -070033{{- end }}