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.smf.deploy }} |
| 8 | |
| 9 | {{- if not .Values.config.useExistingConfigMap -}} |
| 10 | {{- $smfcfg := index .Values.config.smf.cfgFiles "smfcfg.conf" }} |
| 11 | {{- $sbi := index $smfcfg.configuration "sbi" }} |
| 12 | |
| 13 | {{- if not (hasKey $smfcfg "logger") -}} |
| 14 | {{- $_ := .Values.config.logger | set $smfcfg "logger" -}} |
| 15 | {{- end }} |
| 16 | {{- if not (hasKey $sbi "port") -}} |
| 17 | {{- $_ := .Values.config.smf.sbi.port | set $sbi "port" -}} |
| 18 | {{- end }} |
| 19 | {{- end }} |
| 20 | |
| 21 | --- |
| 22 | apiVersion: v1 |
| 23 | kind: ConfigMap |
| 24 | metadata: |
| 25 | name: smf |
| 26 | labels: |
| 27 | {{ tuple "smf" . | include "5g-control-plane.metadata_labels" | indent 4 }} |
| 28 | data: |
| 29 | smf-run.sh: | |
| 30 | {{ tuple "bin/_smf-run.sh.tpl" . | include "5g-control-plane.template" | indent 4 }} |
| 31 | {{- if not .Values.config.useExistingConfigMap -}} |
| 32 | {{- range $key, $value := .Values.config.smf.cfgFiles }} |
| 33 | {{ $key }}: |- |
| 34 | {{ toYaml $value | indent 4 }} |
| 35 | {{- end }} |
| 36 | {{- end }} |
| 37 | {{- end }} |