blob: 10ecaed58efaf6002849f991e978f9a729fae1ac [file] [log] [blame]
badhri854c028b32021-11-03 18:24:05 -05001{{/*
2# Copyright 2020-present Open Networking Foundation
3
Ajay Lotan Thakur03189d22022-02-10 14:06:03 -06004# SPDX-License-Identifier: Apache-2.0
badhri854c028b32021-11-03 18:24:05 -05005*/}}
6
7{{- if .Values.config.amf.deploy }}
8
9{{- if not .Values.config.useExistingConfigMap -}}
10{{- $amfcfg := index .Values.config.amf.cfgFiles "amfcfg.conf" }}
11{{- $sbi := index $amfcfg.configuration "sbi" }}
12
13{{- if not (hasKey $sbi "port") -}}
14{{- $_ := .Values.config.amf.sbi.port | set $sbi "port" -}}
15{{- end }}
16
Ajay Lotan Thakur6de3b782022-04-14 08:41:12 -060017{{- if not (hasKey $amfcfg.configuration "ngappPort") -}}
18{{- $_ := .Values.config.amf.ngapp.port | set $amfcfg.configuration "ngappPort" -}}
19{{- end }}
20
21{{- if not (hasKey $amfcfg.configuration "sctpGrpcPort") -}}
22{{- $_ := .Values.config.amf.sctp_grpc.port | set $amfcfg.configuration "sctpGrpcPort" -}}
23{{- end }}
24
badhri854c028b32021-11-03 18:24:05 -050025{{- if not (hasKey $amfcfg "logger") -}}
26{{- $_ := .Values.config.logger | set $amfcfg "logger" -}}
27{{- end }}
28
Ajay Lotan Thakur6de3b782022-04-14 08:41:12 -060029{{- if not (hasKey $amfcfg.configuration "enableSctpLb") -}}
30{{- $_ := .Values.config.sctplb.deploy | set $amfcfg.configuration "enableSctpLb" -}}
31{{- end }}
32
33
badhri854c028b32021-11-03 18:24:05 -050034{{- end }}
35
36
37---
38apiVersion: v1
39kind: ConfigMap
40metadata:
41 name: amf
42 labels:
43{{ tuple "amf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
44data:
45 amf-run.sh: |
46{{ tuple "bin/_amf-run.sh.tpl" . | include "5g-control-plane.template" | indent 4 }}
47{{- if not .Values.config.useExistingConfigMap -}}
48{{- range $key, $value := .Values.config.amf.cfgFiles }}
49 {{ $key }}: |-
50{{ toYaml $value | indent 4 }}
51{{- end }}
52{{- end }}
53{{- end }}