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