blob: 5747fed3d8ce12af8f8e7f1abfeb616e7afd1930 [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
Hyunsun Moon6a651482021-02-26 01:46:44 -080013{{- if not (hasKey $sbi "port") -}}
14{{- $_ := .Values.config.amf.sbi.port | set $sbi "port" -}}
15{{- end }}
16
Ajay Lotan Thakuref182f42021-05-25 16:41:19 -050017{{- if not (hasKey $amfcfg "logger") -}}
18{{- $_ := .Values.config.logger | set $amfcfg "logger" -}}
19{{- end }}
20
Hyunsun Moon6a651482021-02-26 01:46:44 -080021{{- end }}
rootd623d5b2021-03-11 09:06:34 -070022
Hyunsun Moon6a651482021-02-26 01:46:44 -080023
Badhrinath987e1d82020-11-20 13:23:58 -060024---
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 }}
Hyunsun Moonc73636b2021-03-24 15:47:08 -070034{{- if not .Values.config.useExistingConfigMap -}}
Hyunsun Moon6a651482021-02-26 01:46:44 -080035{{- range $key, $value := .Values.config.amf.cfgFiles }}
Badhrinath987e1d82020-11-20 13:23:58 -060036 {{ $key }}: |-
37{{ toYaml $value | indent 4 }}
38{{- end }}
39{{- end }}
Hyunsun Moonc73636b2021-03-24 15:47:08 -070040{{- end }}