blob: a5ff8cfdc0de5341ecfb489bb5d7dde9adf3bc74 [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
Ajay Lotan Thakure7d9a252022-07-07 16:02:07 -060013{{- if not (hasKey $smfcfg "mongodb") -}}
14{{- $_ := dict "name" .Values.config.mongodb.name "url" .Values.config.mongodb.url | set $smfcfg "mongodb" -}}
15{{- end }}
16
badhri854c028b32021-11-03 18:24:05 -050017{{- if not (hasKey $smfcfg "logger") -}}
18{{- $_ := .Values.config.logger | set $smfcfg "logger" -}}
19{{- end }}
20{{- if not (hasKey $sbi "port") -}}
21{{- $_ := .Values.config.smf.sbi.port | set $sbi "port" -}}
22{{- end }}
Ajay Lotan Thakura2e2adb2022-06-06 13:46:30 -060023{{- if not (hasKey $smfcfg.configuration "nfKafka") -}}
24{{- $_ := .Values.kafka.nfKafka | set $smfcfg.configuration "nfKafka" -}}
25{{- $_ := .Values.kafka.deploy | set $smfcfg.configuration.nfKafka "enable" -}}
26{{- end }}
badhri854c028b32021-11-03 18:24:05 -050027{{- end }}
28
29---
30apiVersion: v1
31kind: ConfigMap
32metadata:
33 name: smf
34 labels:
35{{ tuple "smf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
36data:
37 smf-run.sh: |
38{{ tuple "bin/_smf-run.sh.tpl" . | include "5g-control-plane.template" | indent 4 }}
39{{- if not .Values.config.useExistingConfigMap -}}
40{{- range $key, $value := .Values.config.smf.cfgFiles }}
41 {{ $key }}: |-
42{{ toYaml $value | indent 4 }}
43{{- end }}
44{{- end }}
45{{- end }}