blob: 20e3e69c1c2645b1e6b410cdc9fdabb77bdfd78e [file] [log] [blame]
{{/*
# Copyright 2020-present Open Networking Foundation
# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
*/}}
{{- if .Values.config.nssf.deploy }}
{{- $nssfcfg := index .Values.config.nssf.cfgFiles "nssfcfg.conf" }}
{{- $sbi := index $nssfcfg.configuration "sbi" }}
{{- if not (hasKey $sbi "registerIPv4") -}}
{{- $_ := "POD_IP" | set $sbi "registerIPv4" -}}
{{- end }}
{{- if not (hasKey $sbi "bindingIPv4") -}}
{{- $_ := "POD_IP" | set $sbi "bindingIPv4" -}}
{{- end }}
{{- if not (hasKey $sbi "port") -}}
{{- $_ := .Values.config.nssf.sbi.port | set $sbi "port" -}}
{{- end }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: nssf
labels:
{{ tuple "nssf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
data:
nssf-run.sh: |
{{ tuple "bin/_nssf-run.sh.tpl" . | include "5g-control-plane.template" | indent 4 }}
{{- range $key, $value := .Values.config.nssf.cfgFiles }}
{{ $key }}: |-
{{ toYaml $value | indent 4 }}
{{- end }}
{{- end }}