| {{/* |
| # Copyright 2020-present Open Networking Foundation |
| |
| # SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0 |
| */}} |
| |
| {{- if .Values.config.nrf.deploy }} |
| |
| {{- $nrfcfg := index .Values.config.nrf.cfgFiles "nrfcfg.conf" }} |
| {{- $config := index $nrfcfg "configuration" }} |
| {{- $sbi := index $config "sbi" }} |
| |
| {{- if not (hasKey $config "MongoDBName") -}} |
| {{- $_ := .Values.config.mongodb.name | set $config "MongoDBName" -}} |
| {{- end }} |
| {{- if not (hasKey $config "MongoDBUrl") -}} |
| {{- $_ := .Values.config.mongodb.url | set $config "MongoDBUrl" -}} |
| {{- end }} |
| {{- if not (hasKey $config "DefaultServiceIP") -}} |
| {{- $_ := "POD_IP" | set $config "DefaultServiceIP" -}} |
| {{- end }} |
| |
| {{- 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.nrf.sbi.port | set $sbi "port" -}} |
| {{- end }} |
| |
| --- |
| apiVersion: v1 |
| kind: ConfigMap |
| metadata: |
| name: nrf |
| labels: |
| {{ tuple "nrf" . | include "5g-control-plane.metadata_labels" | indent 4 }} |
| data: |
| nrf-run.sh: | |
| {{ tuple "bin/_nrf-run.sh.tpl" . | include "5g-control-plane.template" | indent 4 }} |
| {{- range $key, $value := .Values.config.nrf.cfgFiles }} |
| {{ $key }}: |- |
| {{ toYaml $value | indent 4 }} |
| {{- end }} |
| {{- end }} |