blob: 20e3e69c1c2645b1e6b410cdc9fdabb77bdfd78e [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
9{{- $nssfcfg := index .Values.config.nssf.cfgFiles "nssfcfg.conf" }}
10{{- $sbi := index $nssfcfg.configuration "sbi" }}
11
12{{- if not (hasKey $sbi "registerIPv4") -}}
13{{- $_ := "POD_IP" | set $sbi "registerIPv4" -}}
14{{- end }}
15{{- if not (hasKey $sbi "bindingIPv4") -}}
16{{- $_ := "POD_IP" | set $sbi "bindingIPv4" -}}
17{{- end }}
18{{- if not (hasKey $sbi "port") -}}
19{{- $_ := .Values.config.nssf.sbi.port | set $sbi "port" -}}
20{{- end }}
21
Badhrinath987e1d82020-11-20 13:23:58 -060022---
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 }}
Hyunsun Moon6a651482021-02-26 01:46:44 -080032{{- range $key, $value := .Values.config.nssf.cfgFiles }}
Badhrinath987e1d82020-11-20 13:23:58 -060033 {{ $key }}: |-
34{{ toYaml $value | indent 4 }}
35{{- end }}
36{{- end }}