badhri85 | 4c028b3 | 2021-11-03 18:24:05 -0500 | [diff] [blame] | 1 | {{/* |
| 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 | --- |
| 23 | apiVersion: v1 |
| 24 | kind: ConfigMap |
| 25 | metadata: |
| 26 | name: udm |
| 27 | labels: |
| 28 | {{ tuple "udm" . | include "5g-control-plane.metadata_labels" | indent 4 }} |
| 29 | data: |
| 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 }} |