blob: 65fe2f5101391950ebac30dba900f2c2fb8406ec [file] [log] [blame]
badhri854c028b32021-11-03 18:24:05 -05001{{/*
Ajay Lotan Thakur9ad7dfe2022-07-25 17:26:03 -06002# SPDX-FileCopyrightText: 2022-present Intel Corporation
badhri854c028b32021-11-03 18:24:05 -05003# Copyright 2020-present Open Networking Foundation
4
Ajay Lotan Thakur03189d22022-02-10 14:06:03 -06005# SPDX-License-Identifier: Apache-2.0
badhri854c028b32021-11-03 18:24:05 -05006*/}}
7
8{{- if .Values.config.smf.deploy }}
9
10{{- if not .Values.config.useExistingConfigMap -}}
11{{- $smfcfg := index .Values.config.smf.cfgFiles "smfcfg.conf" }}
12{{- $sbi := index $smfcfg.configuration "sbi" }}
13
Ajay Lotan Thakur82c4bec2022-09-02 13:51:45 -060014{{- if not (hasKey $smfcfg.configuration "mongodb") -}}
15{{- $_ := dict "name" .Values.config.mongodb.name "url" .Values.config.mongodb.url | set $smfcfg.configuration "mongodb" -}}
Ajay Lotan Thakure7d9a252022-07-07 16:02:07 -060016{{- end }}
17
badhri854c028b32021-11-03 18:24:05 -050018{{- if not (hasKey $smfcfg "logger") -}}
19{{- $_ := .Values.config.logger | set $smfcfg "logger" -}}
20{{- end }}
21{{- if not (hasKey $sbi "port") -}}
22{{- $_ := .Values.config.smf.sbi.port | set $sbi "port" -}}
23{{- end }}
Ajay Lotan Thakur9ad7dfe2022-07-25 17:26:03 -060024{{- if not (hasKey $smfcfg.configuration "enableUPFAdapter") -}}
25{{- $_ := .Values.config.upfadapter.deploy | set $smfcfg.configuration "enableUPFAdapter" -}}
26{{- end }}
Ajay Lotan Thakura2e2adb2022-06-06 13:46:30 -060027{{- if not (hasKey $smfcfg.configuration "nfKafka") -}}
28{{- $_ := .Values.kafka.nfKafka | set $smfcfg.configuration "nfKafka" -}}
29{{- $_ := .Values.kafka.deploy | set $smfcfg.configuration.nfKafka "enable" -}}
30{{- end }}
badhri854c028b32021-11-03 18:24:05 -050031{{- end }}
32
33---
34apiVersion: v1
35kind: ConfigMap
36metadata:
37 name: smf
38 labels:
39{{ tuple "smf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
40data:
41 smf-run.sh: |
42{{ tuple "bin/_smf-run.sh.tpl" . | include "5g-control-plane.template" | indent 4 }}
43{{- if not .Values.config.useExistingConfigMap -}}
44{{- range $key, $value := .Values.config.smf.cfgFiles }}
45 {{ $key }}: |-
46{{ toYaml $value | indent 4 }}
47{{- end }}
48{{- end }}
49{{- end }}