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 | |
| 37 | APP_ARGS="${MGMT_INFO} ${APN_INFO} ${MISC} ${SPGW_CFG}" |
| 38 | interface.cfg: | |
| 39 | [0] |
Hyunsun Moon | 834c28f | 2019-12-05 18:26:22 -0800 | [diff] [blame] | 40 | zmq_protocol = tcp |
Hyunsun Moon | 16d7092 | 2019-08-25 04:57:25 -0500 | [diff] [blame] | 41 | cp_comm_ip = CP_ADDR |
| 42 | cp_comm_port = 21 |
Hyunsun Moon | 834c28f | 2019-12-05 18:26:22 -0800 | [diff] [blame] | 43 | {{- if .Values.config.spgwc.multiUpfs }} |
| 44 | cp_nb_ip = CP_ADDR |
| 45 | cp_nb_port = 21 |
| 46 | dp_comm_ip = 127.0.0.1 |
| 47 | dp_comm_port = 20 |
| 48 | {{- else }} |
| 49 | dp_comm_ip = {{ .Values.config.spgwc.dpComm.addr }} |
| 50 | dp_comm_port = {{ .Values.config.spgwc.dpComm.port }} |
| 51 | {{- end }} |
Hyunsun Moon | 16d7092 | 2019-08-25 04:57:25 -0500 | [diff] [blame] | 52 | spgwc-run.sh: | |
| 53 | {{ tuple "bin/_spgwc-run.sh.tpl" . | include "omec-control-plane.template" | indent 4 }} |
| 54 | {{- range $key, $value := .Values.config.spgwc.cfgFiles }} |
| 55 | {{ $key }}: |- |
| 56 | {{ $value | indent 4 }} |
| 57 | {{- end }} |