blob: 675e85b146d48b191078b651c61cf56d34bfcbe8 [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
Hyunsun Moonc73636b2021-03-24 15:47:08 -07009{{- if not .Values.config.useExistingConfigMap -}}
Hyunsun Moon6a651482021-02-26 01:46:44 -080010{{- $amfcfg := index .Values.config.amf.cfgFiles "amfcfg.conf" }}
11{{- $sbi := index $amfcfg.configuration "sbi" }}
12
13{{- if not (hasKey $sbi "registerIPv4") -}}
14{{- $_ := "POD_IP" | set $sbi "registerIPv4" -}}
15{{- end }}
16{{- if not (hasKey $sbi "bindingIPv4") -}}
17{{- $_ := "POD_IP" | set $sbi "bindingIPv4" -}}
18{{- end }}
19{{- if not (hasKey $sbi "port") -}}
20{{- $_ := .Values.config.amf.sbi.port | set $sbi "port" -}}
21{{- end }}
22
23{{- if not (hasKey $amfcfg.configuration "ngapIpList") -}}
24{{- $_ := list "POD_IP" | set $amfcfg.configuration "ngapIpList" -}}
25{{- end }}
Hyunsun Moonc73636b2021-03-24 15:47:08 -070026{{- end }}
Hyunsun Moon6a651482021-02-26 01:46:44 -080027
Badhrinath987e1d82020-11-20 13:23:58 -060028---
29apiVersion: v1
30kind: ConfigMap
31metadata:
32 name: amf
33 labels:
34{{ tuple "amf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
35data:
36 amf-run.sh: |
37{{ tuple "bin/_amf-run.sh.tpl" . | include "5g-control-plane.template" | indent 4 }}
Hyunsun Moonc73636b2021-03-24 15:47:08 -070038{{- if not .Values.config.useExistingConfigMap -}}
Hyunsun Moon6a651482021-02-26 01:46:44 -080039{{- range $key, $value := .Values.config.amf.cfgFiles }}
Badhrinath987e1d82020-11-20 13:23:58 -060040 {{ $key }}: |-
41{{ toYaml $value | indent 4 }}
42{{- end }}
43{{- end }}
Hyunsun Moonc73636b2021-03-24 15:47:08 -070044{{- end }}