blob: ba00a36672fd79be9278fef8b54581582669d241 [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.smf.deploy }}
8
9{{- if not .Values.config.useExistingConfigMap -}}
10{{- $smfcfg := index .Values.config.smf.cfgFiles "smfcfg.conf" }}
11{{- $sbi := index $smfcfg.configuration "sbi" }}
12
13{{- if not (hasKey $smfcfg "logger") -}}
14{{- $_ := .Values.config.logger | set $smfcfg "logger" -}}
15{{- end }}
16{{- if not (hasKey $sbi "port") -}}
17{{- $_ := .Values.config.smf.sbi.port | set $sbi "port" -}}
18{{- end }}
19{{- end }}
20
21---
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 }}
31{{- if not .Values.config.useExistingConfigMap -}}
32{{- range $key, $value := .Values.config.smf.cfgFiles }}
33 {{ $key }}: |-
34{{ toYaml $value | indent 4 }}
35{{- end }}
36{{- end }}
37{{- end }}