Hyunsun Moon | 16d7092 | 2019-08-25 04:57:25 -0500 | [diff] [blame] | 1 | {{/* |
| 2 | Copyright 2019-present Open Networking Foundation |
| 3 | |
| 4 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | you may not use this file except in compliance with the License. |
| 6 | You may obtain a copy of the License at |
| 7 | |
| 8 | http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | |
| 10 | Unless required by applicable law or agreed to in writing, software |
| 11 | distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | See the License for the specific language governing permissions and |
| 14 | limitations under the License. |
| 15 | */}} |
| 16 | |
| 17 | --- |
| 18 | apiVersion: v1 |
| 19 | kind: ConfigMap |
| 20 | metadata: |
| 21 | name: spgwc |
| 22 | labels: |
| 23 | {{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }} |
| 24 | data: |
| 25 | cp_config.cfg: | |
| 26 | if [ ! -d "/dev/hugepages" ]; then |
| 27 | MEMORY="--no-huge -m $((MEM_LIMIT-1024))" |
| 28 | fi |
| 29 | CORES="-c $(taskset -p $$ | awk '{print $NF}')" |
| 30 | EAL_ARGS="${CORES} ${MEMORY} --no-pci" |
| 31 | |
Ajay Lotan Thakur | 33c4ff9 | 2020-01-16 15:15:25 -0800 | [diff] [blame] | 32 | MGMT_INFO="-s ${POD_IP} -w {{ .Values.config.spgwc.s1uAddr }}" |
Hyunsun Moon | 16d7092 | 2019-08-25 04:57:25 -0500 | [diff] [blame] | 33 | APN_INFO="-i {{ .Values.config.spgwc.ueIpPool.ip }} -p {{ .Values.config.spgwc.ueIpPool.mask }} -a {{ .Values.config.spgwc.apn }}" |
| 34 | MISC="-l 2" |
| 35 | SPGW_CFG="-d 03" |
| 36 | |
Ajay Lotan Thakur | 44967c8 | 2020-03-06 13:37:01 -0800 | [diff] [blame] | 37 | {{- if .Values.config.spgwc.multiUpfs }} |
| 38 | CONFIG_UPDATE_FOLDER="-f /etc/cp/config/" |
| 39 | APP_ARGS="${MGMT_INFO} ${APN_INFO} ${MISC} ${SPGW_CFG} ${CONFIG_UPDATE_FOLDER}" |
| 40 | {{- else }} |
Ajay Lotan Thakur | bb5d9a8 | 2020-03-24 20:05:30 -0600 | [diff] [blame] | 41 | APP_ARGS="${MGMT_INFO} ${APN_INFO} ${MISC} ${SPGW_CFG} " |
Ajay Lotan Thakur | 44967c8 | 2020-03-06 13:37:01 -0800 | [diff] [blame] | 42 | {{- end }} |
Hyunsun Moon | 16d7092 | 2019-08-25 04:57:25 -0500 | [diff] [blame] | 43 | interface.cfg: | |
| 44 | [0] |
Hyunsun Moon | 834c28f | 2019-12-05 18:26:22 -0800 | [diff] [blame] | 45 | zmq_protocol = tcp |
Hyunsun Moon | 16d7092 | 2019-08-25 04:57:25 -0500 | [diff] [blame] | 46 | cp_comm_ip = CP_ADDR |
| 47 | cp_comm_port = 21 |
Hyunsun Moon | 834c28f | 2019-12-05 18:26:22 -0800 | [diff] [blame] | 48 | {{- if .Values.config.spgwc.multiUpfs }} |
| 49 | cp_nb_ip = CP_ADDR |
| 50 | cp_nb_port = 21 |
| 51 | dp_comm_ip = 127.0.0.1 |
| 52 | dp_comm_port = 20 |
| 53 | {{- else }} |
| 54 | dp_comm_ip = {{ .Values.config.spgwc.dpComm.addr }} |
| 55 | dp_comm_port = {{ .Values.config.spgwc.dpComm.port }} |
| 56 | {{- end }} |
Hyunsun Moon | 16d7092 | 2019-08-25 04:57:25 -0500 | [diff] [blame] | 57 | spgwc-run.sh: | |
| 58 | {{ tuple "bin/_spgwc-run.sh.tpl" . | include "omec-control-plane.template" | indent 4 }} |
| 59 | {{- range $key, $value := .Values.config.spgwc.cfgFiles }} |
| 60 | {{ $key }}: |- |
| 61 | {{ $value | indent 4 }} |
| 62 | {{- end }} |