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.nssf.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 | {{- $nssfcfg := index .Values.config.nssf.cfgFiles "nssfcfg.conf" }} |
| 11 | {{- $sbi := index $nssfcfg.configuration "sbi" }} |
| 12 | |
Hyunsun Moon | 6a65148 | 2021-02-26 01:46:44 -0800 | [diff] [blame] | 13 | {{- if not (hasKey $sbi "port") -}} |
| 14 | {{- $_ := .Values.config.nssf.sbi.port | set $sbi "port" -}} |
| 15 | {{- end }} |
Hyunsun Moon | c73636b | 2021-03-24 15:47:08 -0700 | [diff] [blame] | 16 | {{- end }} |
Hyunsun Moon | 6a65148 | 2021-02-26 01:46:44 -0800 | [diff] [blame] | 17 | |
Badhrinath | 987e1d8 | 2020-11-20 13:23:58 -0600 | [diff] [blame] | 18 | --- |
| 19 | apiVersion: v1 |
| 20 | kind: ConfigMap |
| 21 | metadata: |
| 22 | name: nssf |
| 23 | labels: |
| 24 | {{ tuple "nssf" . | include "5g-control-plane.metadata_labels" | indent 4 }} |
| 25 | data: |
| 26 | nssf-run.sh: | |
| 27 | {{ tuple "bin/_nssf-run.sh.tpl" . | include "5g-control-plane.template" | indent 4 }} |
Hyunsun Moon | c73636b | 2021-03-24 15:47:08 -0700 | [diff] [blame] | 28 | {{- if not .Values.config.useExistingConfigMap -}} |
Hyunsun Moon | 6a65148 | 2021-02-26 01:46:44 -0800 | [diff] [blame] | 29 | {{- range $key, $value := .Values.config.nssf.cfgFiles }} |
Badhrinath | 987e1d8 | 2020-11-20 13:23:58 -0600 | [diff] [blame] | 30 | {{ $key }}: |- |
| 31 | {{ toYaml $value | indent 4 }} |
| 32 | {{- end }} |
| 33 | {{- end }} |
Hyunsun Moon | c73636b | 2021-03-24 15:47:08 -0700 | [diff] [blame] | 34 | {{- end }} |