blob: 12515daefcf6e4a3eb3c9a0ab86d9c8b5e6b6364 [file] [log] [blame]
Hyunsun Moon16d70922019-08-25 04:57:25 -05001{{/*
2Copyright 2019-present Open Networking Foundation
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15*/}}
16
17---
18apiVersion: v1
19kind: ConfigMap
20metadata:
21 name: spgwc
22 labels:
23{{ tuple "spgwc" . | include "omec-control-plane.metadata_labels" | indent 4 }}
24data:
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 Thakur33c4ff92020-01-16 15:15:25 -080032 MGMT_INFO="-s ${POD_IP} -w {{ .Values.config.spgwc.s1uAddr }}"
Hyunsun Moon16d70922019-08-25 04:57:25 -050033 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 Thakur44967c82020-03-06 13:37:01 -080037{{- 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 }}
Hyunsun Moon16d70922019-08-25 04:57:25 -050041 APP_ARGS="${MGMT_INFO} ${APN_INFO} ${MISC} ${SPGW_CFG}"
Ajay Lotan Thakur44967c82020-03-06 13:37:01 -080042{{- end }}
Hyunsun Moon16d70922019-08-25 04:57:25 -050043 interface.cfg: |
44 [0]
Hyunsun Moon834c28f2019-12-05 18:26:22 -080045 zmq_protocol = tcp
Hyunsun Moon16d70922019-08-25 04:57:25 -050046 cp_comm_ip = CP_ADDR
47 cp_comm_port = 21
Hyunsun Moon834c28f2019-12-05 18:26:22 -080048{{- 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 Moon16d70922019-08-25 04:57:25 -050057 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 }}