badhri85 | 4c028b3 | 2021-11-03 18:24:05 -0500 | [diff] [blame] | 1 | {{/* |
| 2 | # Copyright 2020-present Open Networking Foundation |
| 3 | |
Ajay Lotan Thakur | 03189d2 | 2022-02-10 14:06:03 -0600 | [diff] [blame] | 4 | # SPDX-License-Identifier: Apache-2.0 |
badhri85 | 4c028b3 | 2021-11-03 18:24:05 -0500 | [diff] [blame] | 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 }} |
Ajay Lotan Thakur | a2e2adb | 2022-06-06 13:46:30 -0600 | [diff] [blame^] | 19 | {{- if not (hasKey $smfcfg.configuration "nfKafka") -}} |
| 20 | {{- $_ := .Values.kafka.nfKafka | set $smfcfg.configuration "nfKafka" -}} |
| 21 | {{- $_ := .Values.kafka.deploy | set $smfcfg.configuration.nfKafka "enable" -}} |
| 22 | {{- end }} |
badhri85 | 4c028b3 | 2021-11-03 18:24:05 -0500 | [diff] [blame] | 23 | {{- end }} |
| 24 | |
| 25 | --- |
| 26 | apiVersion: v1 |
| 27 | kind: ConfigMap |
| 28 | metadata: |
| 29 | name: smf |
| 30 | labels: |
| 31 | {{ tuple "smf" . | include "5g-control-plane.metadata_labels" | indent 4 }} |
| 32 | data: |
| 33 | smf-run.sh: | |
| 34 | {{ tuple "bin/_smf-run.sh.tpl" . | include "5g-control-plane.template" | indent 4 }} |
| 35 | {{- if not .Values.config.useExistingConfigMap -}} |
| 36 | {{- range $key, $value := .Values.config.smf.cfgFiles }} |
| 37 | {{ $key }}: |- |
| 38 | {{ toYaml $value | indent 4 }} |
| 39 | {{- end }} |
| 40 | {{- end }} |
| 41 | {{- end }} |