blob: 14657ed6c9006d27b1d23f4512d3a905d28fb77e [file] [log] [blame]
{{/*
# Copyright 2020-present Open Networking Foundation
# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
*/}}
{{- if .Values.config.webui.deploy }}
{{- $webuicfg := index .Values.config.webui.cfgFiles "webuicfg.conf" }}
{{- $config := index $webuicfg "configuration" }}
{{- if not (hasKey $config "mongodb") -}}
{{- $_ := dict "name" .Values.config.mongodb.name "url" .Values.config.mongodb.url | set $config "mongodb" -}}
{{- end }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: webui
labels:
{{ tuple "webui" . | include "5g-control-plane.metadata_labels" | indent 4 }}
data:
webui-run.sh: |
{{ tuple "bin/_webui-run.sh.tpl" . | include "5g-control-plane.template" | indent 4 }}
{{- range $key, $value := .Values.config.webui.cfgFiles }}
{{ $key }}: |-
{{ toYaml $value | indent 4 }}
{{- end }}
{{- end }}