blob: 0d9bebba49867e9456739a41fc5b6acf4347bbb4 [file] [log] [blame]
Badhrinath987e1d82020-11-20 13:23:58 -06001{{/*
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 Moon6a651482021-02-26 01:46:44 -08008
Hyunsun Moonc73636b2021-03-24 15:47:08 -07009{{- if not .Values.config.useExistingConfigMap -}}
Hyunsun Moon6a651482021-02-26 01:46:44 -080010{{- $nssfcfg := index .Values.config.nssf.cfgFiles "nssfcfg.conf" }}
11{{- $sbi := index $nssfcfg.configuration "sbi" }}
12
Hyunsun Moon6a651482021-02-26 01:46:44 -080013{{- if not (hasKey $sbi "port") -}}
14{{- $_ := .Values.config.nssf.sbi.port | set $sbi "port" -}}
15{{- end }}
Hyunsun Moonc73636b2021-03-24 15:47:08 -070016{{- end }}
Hyunsun Moon6a651482021-02-26 01:46:44 -080017
Badhrinath987e1d82020-11-20 13:23:58 -060018---
19apiVersion: v1
20kind: ConfigMap
21metadata:
22 name: nssf
23 labels:
24{{ tuple "nssf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
25data:
26 nssf-run.sh: |
27{{ tuple "bin/_nssf-run.sh.tpl" . | include "5g-control-plane.template" | indent 4 }}
Hyunsun Moonc73636b2021-03-24 15:47:08 -070028{{- if not .Values.config.useExistingConfigMap -}}
Hyunsun Moon6a651482021-02-26 01:46:44 -080029{{- range $key, $value := .Values.config.nssf.cfgFiles }}
Badhrinath987e1d82020-11-20 13:23:58 -060030 {{ $key }}: |-
31{{ toYaml $value | indent 4 }}
32{{- end }}
33{{- end }}
Hyunsun Moonc73636b2021-03-24 15:47:08 -070034{{- end }}