blob: 7c37da57350e34111cf8b1e42d167d455c6650b7 [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
Hyunsun Moon6a651482021-02-26 01:46:44 -080017{{- end }}
rootd623d5b2021-03-11 09:06:34 -070018
Hyunsun Moon6a651482021-02-26 01:46:44 -080019
Badhrinath987e1d82020-11-20 13:23:58 -060020---
21apiVersion: v1
22kind: ConfigMap
23metadata:
24 name: amf
25 labels:
26{{ tuple "amf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
27data:
28 amf-run.sh: |
29{{ tuple "bin/_amf-run.sh.tpl" . | include "5g-control-plane.template" | indent 4 }}
Hyunsun Moonc73636b2021-03-24 15:47:08 -070030{{- if not .Values.config.useExistingConfigMap -}}
Hyunsun Moon6a651482021-02-26 01:46:44 -080031{{- range $key, $value := .Values.config.amf.cfgFiles }}
Badhrinath987e1d82020-11-20 13:23:58 -060032 {{ $key }}: |-
33{{ toYaml $value | indent 4 }}
34{{- end }}
35{{- end }}
Hyunsun Moonc73636b2021-03-24 15:47:08 -070036{{- end }}