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