blob: 8c4a8774881e71e0b4ba68d96a3dc5a563e9114a [file] [log] [blame]
{{/*
# Copyright 2020-present Open Networking Foundation
# SPDX-License-Identifier: Apache-2.0
*/}}
{{- if .Values.config.nssf.deploy }}
{{- if not .Values.config.useExistingConfigMap -}}
{{- $nssfcfg := index .Values.config.nssf.cfgFiles "nssfcfg.conf" }}
{{- $sbi := index $nssfcfg.configuration "sbi" }}
{{- if not (hasKey $nssfcfg "logger") -}}
{{- $_ := .Values.config.logger | set $nssfcfg "logger" -}}
{{- end }}
{{- if not (hasKey $sbi "port") -}}
{{- $_ := .Values.config.nssf.sbi.port | set $sbi "port" -}}
{{- end }}
{{- 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 }}
{{- if not .Values.config.useExistingConfigMap -}}
{{- range $key, $value := .Values.config.nssf.cfgFiles }}
{{ $key }}: |-
{{ toYaml $value | indent 4 }}
{{- end }}
{{- end }}
{{- end }}