Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 1 | {{/* |
Jeremy Ronquillo | ec2d3e4 | 2020-06-05 11:33:39 -0700 | [diff] [blame] | 2 | # Copyright 2019-present Open Networking Foundation |
Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 3 | |
Jeremy Ronquillo | 6046ce3 | 2020-06-18 11:06:29 -0700 | [diff] [blame] | 4 | # SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0 |
Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 5 | */}} |
| 6 | |
Hyunsun Moon | 83ff735 | 2020-07-09 11:03:52 -0700 | [diff] [blame] | 7 | {{- if .Values.config.spgwc.deploy }} |
Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 8 | --- |
| 9 | apiVersion: v1 |
| 10 | kind: ConfigMap |
| 11 | metadata: |
| 12 | name: spgwc |
| 13 | labels: |
| 14 | {{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }} |
| 15 | data: |
Ajay Lotan Thakur | b48ed2d | 2020-07-01 11:58:51 -0700 | [diff] [blame] | 16 | {{- 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 Moon | 11d24f9 | 2020-08-26 14:55:19 -0700 | [diff] [blame] | 29 | PROMETHEUS_PORT = {{ .Values.config.spgwc.prometheus.port }} |
Ajay Lotan Thakur | 97278fa | 2020-09-21 17:31:51 -0500 | [diff] [blame^] | 30 | HTTP_PORT = {{ .Values.config.spgwc.http.port }} |
Ajay Lotan Thakur | b48ed2d | 2020-07-01 11:58:51 -0700 | [diff] [blame] | 31 | TRANSMIT_TIMER = 2 |
| 32 | PERIODIC_TIMER = 10 |
| 33 | TRANSMIT_COUNT = 5 |
| 34 | REQUEST_TIMEOUT=1800000 |
| 35 | REQUEST_TRIES=3 |
| 36 | CP_LOGGER = 0 |
| 37 | [NAMESERVER_CONFIG] |
| 38 | [CACHE] |
| 39 | concurrent=25 |
| 40 | percentage=80 |
| 41 | interval_seconds=60 |
| 42 | query_timeout_ms=1000 |
| 43 | query_tries=1 |
| 44 | [APP] |
| 45 | frequency_seconds=3 |
| 46 | filename=appqueries.json |
| 47 | nameserver= {{ .Values.config.spgwc.nameserver}} |
| 48 | [OPS] |
| 49 | frequency_seconds=3 |
| 50 | filename=opsqueries.json |
| 51 | nameserver= {{ .Values.config.spgwc.nameserver}} |
| 52 | [IP_POOL_CONFIG] |
| 53 | IP_POOL_IP= {{.Values.config.spgwc.ueIpPool.ip }} |
| 54 | IP_POOL_MASK= {{ .Values.config.spgwc.ueIpPool.mask }} |
| 55 | {{- end }} |
Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 56 | cp_config.cfg: | |
| 57 | if [ ! -d "/dev/hugepages" ]; then |
| 58 | MEMORY="--no-huge -m $((MEM_LIMIT-1024))" |
| 59 | fi |
| 60 | CORES="-c $(taskset -p $$ | awk '{print $NF}')" |
| 61 | EAL_ARGS="${CORES} ${MEMORY} --no-pci" |
| 62 | |
| 63 | MGMT_INFO="-s ${POD_IP} -w {{ .Values.config.spgwc.s1uAddr }}" |
| 64 | APN_INFO="-i {{ .Values.config.spgwc.ueIpPool.ip }} -p {{ .Values.config.spgwc.ueIpPool.mask }} -a {{ .Values.config.spgwc.apn }}" |
| 65 | MISC="-l 2" |
| 66 | SPGW_CFG="-d 03" |
| 67 | |
| 68 | {{- if .Values.config.spgwc.multiUpfs }} |
| 69 | CONFIG_UPDATE_FOLDER="-f /etc/cp/config/" |
| 70 | APP_ARGS="${MGMT_INFO} ${APN_INFO} ${MISC} ${SPGW_CFG} ${CONFIG_UPDATE_FOLDER}" |
| 71 | {{- else }} |
| 72 | APP_ARGS="${MGMT_INFO} ${APN_INFO} ${MISC} ${SPGW_CFG} " |
| 73 | {{- end }} |
| 74 | interface.cfg: | |
| 75 | [0] |
| 76 | zmq_protocol = tcp |
| 77 | cp_comm_ip = CP_ADDR |
| 78 | cp_comm_port = 21 |
| 79 | {{- if .Values.config.spgwc.multiUpfs }} |
| 80 | cp_nb_ip = CP_ADDR |
| 81 | cp_nb_port = 21 |
| 82 | dp_comm_ip = 127.0.0.1 |
| 83 | dp_comm_port = 20 |
| 84 | {{- else }} |
| 85 | dp_comm_ip = {{ .Values.config.spgwc.dpComm.addr }} |
| 86 | dp_comm_port = {{ .Values.config.spgwc.dpComm.port }} |
| 87 | {{- end }} |
| 88 | spgwc-run.sh: | |
| 89 | {{ tuple "bin/_spgwc-run.sh.tpl" . | include "omec-control-plane.template" | indent 4 }} |
| 90 | {{- range $key, $value := .Values.config.spgwc.cfgFiles }} |
| 91 | {{ $key }}: |- |
| 92 | {{ $value | indent 4 }} |
| 93 | {{- end }} |
Ajay Lotan Thakur | b48ed2d | 2020-07-01 11:58:51 -0700 | [diff] [blame] | 94 | {{- range $key, $value := .Values.config.spgwc.jsonCfgFiles }} |
Hyunsun Moon | 11d24f9 | 2020-08-26 14:55:19 -0700 | [diff] [blame] | 95 | {{ $key }}: |- |
| 96 | {{ toPrettyJson $value | indent 4 }} |
Ajay Lotan Thakur | b48ed2d | 2020-07-01 11:58:51 -0700 | [diff] [blame] | 97 | {{- end }} |
Hyunsun Moon | 83ff735 | 2020-07-09 11:03:52 -0700 | [diff] [blame] | 98 | {{- end }} |