blob: d731378bf052724c809818f6fe658669c7f08e58 [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.amf.deploy }}
Hyunsun Moon6a651482021-02-26 01:46:44 -08008
9{{- $amfcfg := index .Values.config.amf.cfgFiles "amfcfg.conf" }}
10{{- $sbi := index $amfcfg.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.amf.sbi.port | set $sbi "port" -}}
20{{- end }}
21
22{{- if not (hasKey $amfcfg.configuration "ngapIpList") -}}
23{{- $_ := list "POD_IP" | set $amfcfg.configuration "ngapIpList" -}}
24{{- end }}
25
Badhrinath987e1d82020-11-20 13:23:58 -060026---
27apiVersion: v1
28kind: ConfigMap
29metadata:
30 name: amf
31 labels:
32{{ tuple "amf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
33data:
34 amf-run.sh: |
35{{ tuple "bin/_amf-run.sh.tpl" . | include "5g-control-plane.template" | indent 4 }}
Hyunsun Moon6a651482021-02-26 01:46:44 -080036{{- range $key, $value := .Values.config.amf.cfgFiles }}
Badhrinath987e1d82020-11-20 13:23:58 -060037 {{ $key }}: |-
38{{ toYaml $value | indent 4 }}
39{{- end }}
40{{- end }}