blob: f54202021d528bcfb9879883f4671d6f9e1afa90 [file] [log] [blame]
badhri854c028b32021-11-03 18:24:05 -05001{{/*
2# Copyright 2020-present Open Networking Foundation
3
Ajay Lotan Thakurb050aa62022-02-11 13:14:48 -06004# SPDX-License-Identifier: Apache-2.0
badhri854c028b32021-11-03 18:24:05 -05005*/}}
6
7{{- if .Values.config.webui.deploy }}
8
9{{- if not .Values.config.useExistingConfigMap -}}
10{{- $webuicfg := index .Values.config.webui.cfgFiles "webuicfg.conf" }}
11{{- $config := index $webuicfg "configuration" }}
12
13{{- if not (hasKey $webuicfg "logger") -}}
14{{- $_ := .Values.config.logger | set $webuicfg "logger" -}}
15{{- end }}
16
17{{- if not (hasKey $config "managedByConfigPod") -}}
18{{- $_ := .Values.config.managedByConfigPod | set $config "managedByConfigPod" -}}
19{{- end }}
20
21{{- if not (hasKey $config "mongodb") -}}
22{{- $_ := dict "name" .Values.config.mongodb.name "url" .Values.config.mongodb.url | set $config "mongodb" -}}
23{{- end }}
24
25{{- end }}
26
27---
28apiVersion: v1
29kind: ConfigMap
30metadata:
31 name: webui
32 labels:
33{{ tuple "webui" . | include "5g-control-plane.metadata_labels" | indent 4 }}
34data:
35 webui-run.sh: |
36{{ tuple "bin/_webui-run.sh.tpl" . | include "5g-control-plane.template" | indent 4 }}
37{{- if not .Values.config.useExistingConfigMap -}}
38{{- range $key, $value := .Values.config.webui.cfgFiles }}
39 {{ $key }}: |-
40{{ toYaml $value | indent 4 }}
41{{- end }}
42{{- end }}
43{{- end }}