blob: 429499c4c38ba86ded7303cfde7513ac504efc6a [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.smf.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{{- $smfcfg := index .Values.config.smf.cfgFiles "smfcfg.conf" }}
11{{- $sbi := index $smfcfg.configuration "sbi" }}
12
Ajay Lotan Thakuref182f42021-05-25 16:41:19 -050013{{- if not (hasKey $smfcfg "logger") -}}
14{{- $_ := .Values.config.logger | set $smfcfg "logger" -}}
15{{- end }}
Hyunsun Moon6a651482021-02-26 01:46:44 -080016{{- if not (hasKey $sbi "port") -}}
17{{- $_ := .Values.config.smf.sbi.port | set $sbi "port" -}}
18{{- end }}
Hyunsun Moonc73636b2021-03-24 15:47:08 -070019{{- end }}
Hyunsun Moon6a651482021-02-26 01:46:44 -080020
Badhrinath987e1d82020-11-20 13:23:58 -060021---
22apiVersion: v1
23kind: ConfigMap
24metadata:
25 name: smf
26 labels:
27{{ tuple "smf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
28data:
29 smf-run.sh: |
30{{ tuple "bin/_smf-run.sh.tpl" . | include "5g-control-plane.template" | indent 4 }}
Hyunsun Moonc73636b2021-03-24 15:47:08 -070031{{- if not .Values.config.useExistingConfigMap -}}
Hyunsun Moon6a651482021-02-26 01:46:44 -080032{{- range $key, $value := .Values.config.smf.cfgFiles }}
Badhrinath987e1d82020-11-20 13:23:58 -060033 {{ $key }}: |-
34{{ toYaml $value | indent 4 }}
35{{- end }}
36{{- end }}
Hyunsun Moonc73636b2021-03-24 15:47:08 -070037{{- end }}