blob: 2a24a4ac70e8df9e149f91a86d6e5d3d2f3a9b84 [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 }}
Ajay Lotan Thakura2e2adb2022-06-06 13:46:30 -060019{{- if not (hasKey $smfcfg.configuration "nfKafka") -}}
20{{- $_ := .Values.kafka.nfKafka | set $smfcfg.configuration "nfKafka" -}}
21{{- $_ := .Values.kafka.deploy | set $smfcfg.configuration.nfKafka "enable" -}}
22{{- end }}
badhri854c028b32021-11-03 18:24:05 -050023{{- end }}
24
25---
26apiVersion: v1
27kind: ConfigMap
28metadata:
29 name: smf
30 labels:
31{{ tuple "smf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
32data:
33 smf-run.sh: |
34{{ tuple "bin/_smf-run.sh.tpl" . | include "5g-control-plane.template" | indent 4 }}
35{{- if not .Values.config.useExistingConfigMap -}}
36{{- range $key, $value := .Values.config.smf.cfgFiles }}
37 {{ $key }}: |-
38{{ toYaml $value | indent 4 }}
39{{- end }}
40{{- end }}
41{{- end }}