blob: f35bb560ad25db3cfb5e4cbcd450cbce0474b3eb [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
17{{- if not (hasKey $amfcfg "logger") -}}
18{{- $_ := .Values.config.logger | set $amfcfg "logger" -}}
19{{- end }}
20
21{{- end }}
22
23
24---
25apiVersion: v1
26kind: ConfigMap
27metadata:
28 name: amf
29 labels:
30{{ tuple "amf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
31data:
32 amf-run.sh: |
33{{ tuple "bin/_amf-run.sh.tpl" . | include "5g-control-plane.template" | indent 4 }}
34{{- if not .Values.config.useExistingConfigMap -}}
35{{- range $key, $value := .Values.config.amf.cfgFiles }}
36 {{ $key }}: |-
37{{ toYaml $value | indent 4 }}
38{{- end }}
39{{- end }}
40{{- end }}