blob: f6a880880ec7370de733558952be85254614e2a3 [file] [log] [blame]
badhri854c028b32021-11-03 18:24:05 -05001{{/*
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---
23apiVersion: v1
24kind: ConfigMap
25metadata:
26 name: nssf
27 labels:
28{{ tuple "nssf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
29data:
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 }}