blob: 4e3ebef5365964a80caf26382c59bfda42344794 [file] [log] [blame]
{{/*
# Copyright 2019-present Open Networking Foundation
# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
*/}}
{{- if .Values.config.spgwc.deploy }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: spgwc
labels:
{{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }}
data:
{{- if .Values.config.spgwc.pfcp }}
cp.cfg: |
[GLOBAL]
CP_TYPE = 03
GX_CONFIG = 0
S11_IP = CP_ADDR
S11_PORT = 2123
S5S8_IP = CP_ADDR
S5S8_PORT = 2123
PFCP_IP = CP_ADDR
PFCP_PORT = 8805
UPF_PFCP_IP = 127.0.0.1
UPF_PFCP_PORT = 8805
PROMETHEUS_PORT = {{ .Values.config.spgwc.prometheus.port }}
TRANSMIT_TIMER = 2
PERIODIC_TIMER = 10
TRANSMIT_COUNT = 5
REQUEST_TIMEOUT=1800000
REQUEST_TRIES=3
CP_LOGGER = 0
[NAMESERVER_CONFIG]
[CACHE]
concurrent=25
percentage=80
interval_seconds=60
query_timeout_ms=1000
query_tries=1
[APP]
frequency_seconds=3
filename=appqueries.json
nameserver= {{ .Values.config.spgwc.nameserver}}
[OPS]
frequency_seconds=3
filename=opsqueries.json
nameserver= {{ .Values.config.spgwc.nameserver}}
[IP_POOL_CONFIG]
IP_POOL_IP= {{.Values.config.spgwc.ueIpPool.ip }}
IP_POOL_MASK= {{ .Values.config.spgwc.ueIpPool.mask }}
{{- end }}
cp_config.cfg: |
if [ ! -d "/dev/hugepages" ]; then
MEMORY="--no-huge -m $((MEM_LIMIT-1024))"
fi
CORES="-c $(taskset -p $$ | awk '{print $NF}')"
EAL_ARGS="${CORES} ${MEMORY} --no-pci"
MGMT_INFO="-s ${POD_IP} -w {{ .Values.config.spgwc.s1uAddr }}"
APN_INFO="-i {{ .Values.config.spgwc.ueIpPool.ip }} -p {{ .Values.config.spgwc.ueIpPool.mask }} -a {{ .Values.config.spgwc.apn }}"
MISC="-l 2"
SPGW_CFG="-d 03"
{{- if .Values.config.spgwc.multiUpfs }}
CONFIG_UPDATE_FOLDER="-f /etc/cp/config/"
APP_ARGS="${MGMT_INFO} ${APN_INFO} ${MISC} ${SPGW_CFG} ${CONFIG_UPDATE_FOLDER}"
{{- else }}
APP_ARGS="${MGMT_INFO} ${APN_INFO} ${MISC} ${SPGW_CFG} "
{{- end }}
interface.cfg: |
[0]
zmq_protocol = tcp
cp_comm_ip = CP_ADDR
cp_comm_port = 21
{{- if .Values.config.spgwc.multiUpfs }}
cp_nb_ip = CP_ADDR
cp_nb_port = 21
dp_comm_ip = 127.0.0.1
dp_comm_port = 20
{{- else }}
dp_comm_ip = {{ .Values.config.spgwc.dpComm.addr }}
dp_comm_port = {{ .Values.config.spgwc.dpComm.port }}
{{- end }}
spgwc-run.sh: |
{{ tuple "bin/_spgwc-run.sh.tpl" . | include "omec-control-plane.template" | indent 4 }}
{{- range $key, $value := .Values.config.spgwc.cfgFiles }}
{{ $key }}: |-
{{ $value | indent 4 }}
{{- end }}
{{- range $key, $value := .Values.config.spgwc.jsonCfgFiles }}
{{ $key }}: |-
{{ toPrettyJson $value | indent 4 }}
{{- end }}
{{- end }}