Badhrinath | 987e1d8 | 2020-11-20 13:23:58 -0600 | [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 }} |
Hyunsun Moon | 6a65148 | 2021-02-26 01:46:44 -0800 | [diff] [blame] | 8 | |
Hyunsun Moon | c73636b | 2021-03-24 15:47:08 -0700 | [diff] [blame] | 9 | {{- if not .Values.config.useExistingConfigMap -}} |
Hyunsun Moon | 6a65148 | 2021-02-26 01:46:44 -0800 | [diff] [blame] | 10 | {{- $smfcfg := index .Values.config.smf.cfgFiles "smfcfg.conf" }} |
| 11 | {{- $sbi := index $smfcfg.configuration "sbi" }} |
| 12 | |
Ajay Lotan Thakur | ef182f4 | 2021-05-25 16:41:19 -0500 | [diff] [blame] | 13 | {{- if not (hasKey $smfcfg "logger") -}} |
| 14 | {{- $_ := .Values.config.logger | set $smfcfg "logger" -}} |
| 15 | {{- end }} |
Hyunsun Moon | 6a65148 | 2021-02-26 01:46:44 -0800 | [diff] [blame] | 16 | {{- if not (hasKey $sbi "port") -}} |
| 17 | {{- $_ := .Values.config.smf.sbi.port | set $sbi "port" -}} |
| 18 | {{- end }} |
Hyunsun Moon | c73636b | 2021-03-24 15:47:08 -0700 | [diff] [blame] | 19 | {{- end }} |
Hyunsun Moon | 6a65148 | 2021-02-26 01:46:44 -0800 | [diff] [blame] | 20 | |
Badhrinath | 987e1d8 | 2020-11-20 13:23:58 -0600 | [diff] [blame] | 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 }} |
Hyunsun Moon | c73636b | 2021-03-24 15:47:08 -0700 | [diff] [blame] | 31 | {{- if not .Values.config.useExistingConfigMap -}} |
Hyunsun Moon | 6a65148 | 2021-02-26 01:46:44 -0800 | [diff] [blame] | 32 | {{- range $key, $value := .Values.config.smf.cfgFiles }} |
Badhrinath | 987e1d8 | 2020-11-20 13:23:58 -0600 | [diff] [blame] | 33 | {{ $key }}: |- |
| 34 | {{ toYaml $value | indent 4 }} |
| 35 | {{- end }} |
| 36 | {{- end }} |
Hyunsun Moon | c73636b | 2021-03-24 15:47:08 -0700 | [diff] [blame] | 37 | {{- end }} |