blob: 71126b4f11654a429d6b41d742c939d72aa2c0af [file] [log] [blame]
badhri854c028b32021-11-03 18:24:05 -05001{{/*
2# Copyright 2020-present Open Networking Foundation
3
Ajay Lotan Thakur03189d22022-02-10 14:06:03 -06004# SPDX-License-Identifier: Apache-2.0
badhri854c028b32021-11-03 18:24:05 -05005*/}}
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 }}