blob: 79f98c6e894485108eb79111a1bfa894fca2a2b0 [file] [log] [blame]
badhri854c028b32021-11-03 18:24:05 -05001{{/*
2# Copyright 2020-present Open Networking Foundation
3
4# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
5*/}}
6
7{{- if .Values.config.udm.deploy }}
8
9{{- if not .Values.config.useExistingConfigMap -}}
10{{- $udmcfg := index .Values.config.udm.cfgFiles "udmcfg.conf" }}
11{{- $sbi := index $udmcfg.configuration "sbi" }}
12
13{{- if not (hasKey $udmcfg "logger") -}}
14{{- $_ := .Values.config.logger | set $udmcfg "logger" -}}
15{{- end }}
16
17{{- if not (hasKey $sbi "port") -}}
18{{- $_ := .Values.config.udm.sbi.port | set $sbi "port" -}}
19{{- end }}
20{{- end }}
21
22---
23apiVersion: v1
24kind: ConfigMap
25metadata:
26 name: udm
27 labels:
28{{ tuple "udm" . | include "5g-control-plane.metadata_labels" | indent 4 }}
29data:
30 udm-run.sh: |
31{{ tuple "bin/_udm-run.sh.tpl" . | include "5g-control-plane.template" | indent 4 }}
32{{- if not .Values.config.useExistingConfigMap -}}
33{{- range $key, $value := .Values.config.udm.cfgFiles }}
34 {{ $key }}: |-
35{{ toYaml $value | indent 4 }}
36{{- end }}
37{{- end }}
38{{- end }}