blob: 79f98c6e894485108eb79111a1bfa894fca2a2b0 [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.udm.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{{- $udmcfg := index .Values.config.udm.cfgFiles "udmcfg.conf" }}
11{{- $sbi := index $udmcfg.configuration "sbi" }}
12
Ajay Lotan Thakuref182f42021-05-25 16:41:19 -050013{{- if not (hasKey $udmcfg "logger") -}}
14{{- $_ := .Values.config.logger | set $udmcfg "logger" -}}
15{{- end }}
16
Hyunsun Moon6a651482021-02-26 01:46:44 -080017{{- if not (hasKey $sbi "port") -}}
18{{- $_ := .Values.config.udm.sbi.port | set $sbi "port" -}}
19{{- end }}
Hyunsun Moonc73636b2021-03-24 15:47:08 -070020{{- end }}
Hyunsun Moon6a651482021-02-26 01:46:44 -080021
Badhrinath987e1d82020-11-20 13:23:58 -060022---
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 }}
Hyunsun Moonc73636b2021-03-24 15:47:08 -070032{{- if not .Values.config.useExistingConfigMap -}}
Hyunsun Moon6a651482021-02-26 01:46:44 -080033{{- range $key, $value := .Values.config.udm.cfgFiles }}
Badhrinath987e1d82020-11-20 13:23:58 -060034 {{ $key }}: |-
35{{ toYaml $value | indent 4 }}
36{{- end }}
37{{- end }}
Hyunsun Moonc73636b2021-03-24 15:47:08 -070038{{- end }}