blob: 4e3ebef5365964a80caf26382c59bfda42344794 [file] [log] [blame]
Jeremy Ronquillo223db002020-06-05 10:28:22 -07001{{/*
Jeremy Ronquilloec2d3e42020-06-05 11:33:39 -07002# Copyright 2019-present Open Networking Foundation
Jeremy Ronquillo223db002020-06-05 10:28:22 -07003
Jeremy Ronquillo6046ce32020-06-18 11:06:29 -07004# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
Jeremy Ronquillo223db002020-06-05 10:28:22 -07005*/}}
6
Hyunsun Moon83ff7352020-07-09 11:03:52 -07007{{- if .Values.config.spgwc.deploy }}
Jeremy Ronquillo223db002020-06-05 10:28:22 -07008---
9apiVersion: v1
10kind: ConfigMap
11metadata:
12 name: spgwc
13 labels:
14{{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }}
15data:
Ajay Lotan Thakurb48ed2d2020-07-01 11:58:51 -070016{{- if .Values.config.spgwc.pfcp }}
17 cp.cfg: |
18 [GLOBAL]
19 CP_TYPE = 03
20 GX_CONFIG = 0
21 S11_IP = CP_ADDR
22 S11_PORT = 2123
23 S5S8_IP = CP_ADDR
24 S5S8_PORT = 2123
25 PFCP_IP = CP_ADDR
26 PFCP_PORT = 8805
27 UPF_PFCP_IP = 127.0.0.1
28 UPF_PFCP_PORT = 8805
Hyunsun Moon11d24f92020-08-26 14:55:19 -070029 PROMETHEUS_PORT = {{ .Values.config.spgwc.prometheus.port }}
Ajay Lotan Thakurb48ed2d2020-07-01 11:58:51 -070030 TRANSMIT_TIMER = 2
31 PERIODIC_TIMER = 10
32 TRANSMIT_COUNT = 5
33 REQUEST_TIMEOUT=1800000
34 REQUEST_TRIES=3
35 CP_LOGGER = 0
36 [NAMESERVER_CONFIG]
37 [CACHE]
38 concurrent=25
39 percentage=80
40 interval_seconds=60
41 query_timeout_ms=1000
42 query_tries=1
43 [APP]
44 frequency_seconds=3
45 filename=appqueries.json
46 nameserver= {{ .Values.config.spgwc.nameserver}}
47 [OPS]
48 frequency_seconds=3
49 filename=opsqueries.json
50 nameserver= {{ .Values.config.spgwc.nameserver}}
51 [IP_POOL_CONFIG]
52 IP_POOL_IP= {{.Values.config.spgwc.ueIpPool.ip }}
53 IP_POOL_MASK= {{ .Values.config.spgwc.ueIpPool.mask }}
54{{- end }}
Jeremy Ronquillo223db002020-06-05 10:28:22 -070055 cp_config.cfg: |
56 if [ ! -d "/dev/hugepages" ]; then
57 MEMORY="--no-huge -m $((MEM_LIMIT-1024))"
58 fi
59 CORES="-c $(taskset -p $$ | awk '{print $NF}')"
60 EAL_ARGS="${CORES} ${MEMORY} --no-pci"
61
62 MGMT_INFO="-s ${POD_IP} -w {{ .Values.config.spgwc.s1uAddr }}"
63 APN_INFO="-i {{ .Values.config.spgwc.ueIpPool.ip }} -p {{ .Values.config.spgwc.ueIpPool.mask }} -a {{ .Values.config.spgwc.apn }}"
64 MISC="-l 2"
65 SPGW_CFG="-d 03"
66
67{{- if .Values.config.spgwc.multiUpfs }}
68 CONFIG_UPDATE_FOLDER="-f /etc/cp/config/"
69 APP_ARGS="${MGMT_INFO} ${APN_INFO} ${MISC} ${SPGW_CFG} ${CONFIG_UPDATE_FOLDER}"
70{{- else }}
71 APP_ARGS="${MGMT_INFO} ${APN_INFO} ${MISC} ${SPGW_CFG} "
72{{- end }}
73 interface.cfg: |
74 [0]
75 zmq_protocol = tcp
76 cp_comm_ip = CP_ADDR
77 cp_comm_port = 21
78{{- if .Values.config.spgwc.multiUpfs }}
79 cp_nb_ip = CP_ADDR
80 cp_nb_port = 21
81 dp_comm_ip = 127.0.0.1
82 dp_comm_port = 20
83{{- else }}
84 dp_comm_ip = {{ .Values.config.spgwc.dpComm.addr }}
85 dp_comm_port = {{ .Values.config.spgwc.dpComm.port }}
86{{- end }}
87 spgwc-run.sh: |
88{{ tuple "bin/_spgwc-run.sh.tpl" . | include "omec-control-plane.template" | indent 4 }}
89{{- range $key, $value := .Values.config.spgwc.cfgFiles }}
90 {{ $key }}: |-
91{{ $value | indent 4 }}
92{{- end }}
Ajay Lotan Thakurb48ed2d2020-07-01 11:58:51 -070093{{- range $key, $value := .Values.config.spgwc.jsonCfgFiles }}
Hyunsun Moon11d24f92020-08-26 14:55:19 -070094 {{ $key }}: |-
95{{ toPrettyJson $value | indent 4 }}
Ajay Lotan Thakurb48ed2d2020-07-01 11:58:51 -070096{{- end }}
Hyunsun Moon83ff7352020-07-09 11:03:52 -070097{{- end }}