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