blob: ea9aeb4676ddb2da15e276b39bd6d1b015676be4 [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
37 APP_ARGS="${MGMT_INFO} ${APN_INFO} ${MISC} ${SPGW_CFG}"
38 interface.cfg: |
39 [0]
Hyunsun Moon834c28f2019-12-05 18:26:22 -080040 zmq_protocol = tcp
Hyunsun Moon16d70922019-08-25 04:57:25 -050041 cp_comm_ip = CP_ADDR
42 cp_comm_port = 21
Hyunsun Moon834c28f2019-12-05 18:26:22 -080043{{- 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 Moon16d70922019-08-25 04:57:25 -050052 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 }}