blob: 887bcf0eb879ceb31c7d6fd3e547390b86c497dd [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
Ajay Lotan Thakure7d9a252022-07-07 16:02:07 -060025{{- if not (hasKey $amfcfg "mongodb") -}}
26{{- $_ := dict "name" .Values.config.mongodb.name "url" .Values.config.mongodb.url | set $amfcfg "mongodb" -}}
27{{- end }}
28
badhri854c028b32021-11-03 18:24:05 -050029{{- if not (hasKey $amfcfg "logger") -}}
30{{- $_ := .Values.config.logger | set $amfcfg "logger" -}}
31{{- end }}
32
Ajay Lotan Thakur6de3b782022-04-14 08:41:12 -060033{{- if not (hasKey $amfcfg.configuration "enableSctpLb") -}}
34{{- $_ := .Values.config.sctplb.deploy | set $amfcfg.configuration "enableSctpLb" -}}
35{{- end }}
36
Ajay Lotan Thakura2e2adb2022-06-06 13:46:30 -060037{{- if not (hasKey $amfcfg.configuration "nfKafka") -}}
38{{- $_ := .Values.kafka.nfKafka | set $amfcfg.configuration "nfKafka" -}}
39{{- $_ := .Values.kafka.deploy | set $amfcfg.configuration.nfKafka "enable" -}}
40{{- end }}
Ajay Lotan Thakur6de3b782022-04-14 08:41:12 -060041
badhri854c028b32021-11-03 18:24:05 -050042{{- end }}
43
44
45---
46apiVersion: v1
47kind: ConfigMap
48metadata:
49 name: amf
50 labels:
51{{ tuple "amf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
52data:
53 amf-run.sh: |
54{{ tuple "bin/_amf-run.sh.tpl" . | include "5g-control-plane.template" | indent 4 }}
55{{- if not .Values.config.useExistingConfigMap -}}
56{{- range $key, $value := .Values.config.amf.cfgFiles }}
57 {{ $key }}: |-
58{{ toYaml $value | indent 4 }}
59{{- end }}
60{{- end }}
61{{- end }}