blob: e5400bff00f9d12f902acf0b574149b06fc24f99 [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
9{{- $smfcfg := index .Values.config.smf.cfgFiles "smfcfg.conf" }}
10{{- $sbi := index $smfcfg.configuration "sbi" }}
11
12{{- if not (hasKey $smfcfg.configuration "pfcp") -}}
13{{- $_ := dict "addr" "POD_IP" | set $smfcfg.configuration "pfcp" -}}
14{{- end }}
15{{- if not (hasKey $sbi "registerIPv4") -}}
16{{- $_ := "POD_IP" | set $sbi "registerIPv4" -}}
17{{- end }}
18{{- if not (hasKey $sbi "bindingIPv4") -}}
19{{- $_ := "POD_IP" | set $sbi "bindingIPv4" -}}
20{{- end }}
21{{- if not (hasKey $sbi "port") -}}
22{{- $_ := .Values.config.smf.sbi.port | set $sbi "port" -}}
23{{- end }}
24
Badhrinath987e1d82020-11-20 13:23:58 -060025---
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 }}
Hyunsun Moon6a651482021-02-26 01:46:44 -080035{{- range $key, $value := .Values.config.smf.cfgFiles }}
Badhrinath987e1d82020-11-20 13:23:58 -060036 {{ $key }}: |-
37{{ toYaml $value | indent 4 }}
38{{- end }}
39{{- end }}