| {{/* |
| # Copyright 2019-present Open Networking Foundation |
| # Copyright 2019 Intel Corporation |
| |
| # SPDX-License-Identifier: Apache-2.0 |
| # SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0 |
| */}} |
| |
| --- |
| apiVersion: v1 |
| kind: ConfigMap |
| metadata: |
| name: pfcp-agent |
| labels: |
| {{ tuple "pfcp-agent" . | include "omec-pfcp-agent.metadata_labels" | indent 4 }} |
| data: |
| dp_config.cfg: | |
| if [ ! -d "/dev/hugepages" ]; then |
| MEMORY="--no-huge -m 1000" |
| fi |
| CORES="-c $(taskset -p $$ | awk '{print $NF}')" |
| EAL_ARGS="${CORES} ${MEMORY} {{ .Values.config.pfcpAgent.pci }}" |
| |
| {{- if .Values.config.sriov.enabled }} |
| S1U_DEVNAME={{ .Values.config.pfcpAgent.s1u.device }} |
| {{- else }} |
| S1U_DEVNAME={{ .Values.config.pfcpAgent.s1u.device }}-veth |
| {{- end }} |
| {{- if .Values.config.sriov.enabled }} |
| SGI_DEVNAME={{ .Values.config.pfcpAgent.sgi.device }} |
| {{- else }} |
| SGI_DEVNAME={{ .Values.config.pfcpAgent.sgi.device }}-veth |
| {{- end }} |
| |
| S1U_IP=$(ip -4 addr show dev ${S1U_DEVNAME} | grep -oP '(?<=inet\s)\d+(\.\d+){3}') |
| SGI_IP=$(ip -4 addr show dev ${SGI_DEVNAME} | grep -oP '(?<=inet\s)\d+(\.\d+){3}') |
| S1U_MAC=$(ip addr show dev ${S1U_DEVNAME} | awk '$1=="link/ether"{print $2}') |
| SGI_MAC=$(ip addr show dev ${SGI_DEVNAME} | awk '$1=="link/ether"{print $2}') |
| |
| S1U="--s1u_ip ${S1U_IP} --s1u_mac ${S1U_MAC} --ul_iface ${S1U_DEVNAME}" |
| SGI="--sgi_ip ${SGI_IP} --sgi_mac ${SGI_MAC} --dl_iface ${SGI_DEVNAME} --sgi_gw_ip {{ .Values.networks.sgi.gateway }} --sgi_mask {{ .Values.networks.sgi.mask }}" |
| IP_POOL="--ip_pool {{ .Values.config.pfcpAgent.ueIpPool.ip }} --ip_pool_mask {{ .Values.config.pfcpAgent.ueIpPool.mask }}" |
| S1U_MASK="--s1u_mask {{ .Values.config.pfcpAgent.ueIpPool.s1u_mask }}" |
| P4RTC_SERVICE_NAME="--p4rtc_service_name {{.Values.config.pfcpAgent.p4rtc_service.name }}" |
| P4RTC_PORT="--p4rtc_port {{.Values.config.pfcpAgent.p4rtc_service.port }}" |
| MISC="--log 1" |
| SPGW_CFG="--spgw_cfg 03" |
| |
| APP_ARGS="${S1U} ${SGI} ${IP_POOL} ${S1U_MASK} ${P4RTC_SERVICE_NAME} ${P4RTC_PORT} ${MISC} ${SPGW_CFG}" |
| cdr.cfg: | |
| CDR_PATH=./cdr |
| MASTER_CDR=./cdr/master.csv |
| interface.cfg: | |
| [0] |
| zmq_protocol = udp |
| dp_comm_ip = DP_ADDR |
| dp_comm_port = 8805 |
| {{- if .Values.config.pfcpAgent.multiUpfs }} |
| cp_nb_ip = {{ .Values.config.pfcpAgent.cpComm.addr }} |
| cp_nb_port = {{ .Values.config.pfcpAgent.cpComm.port }} |
| cp_comm_ip = {{ .Values.config.pfcpAgent.cpComm.addr }} |
| cp_comm_port = {{ .Values.config.pfcpAgent.cpComm.port }} |
| zmq_dp_ip=127.0.0.1 |
| zmq_cp_ip=127.0.0.1 |
| {{- else }} |
| cp_comm_ip = {{ .Values.config.pfcpAgent.cpComm.addr }} |
| cp_comm_port = {{ .Values.config.pfcpAgent.cpComm.port }} |
| {{- end }} |
| {{- if not .Values.config.sriov.enabled }} |
| setup-af-iface.sh: | |
| {{ tuple "bin/_pfcp-agent-setup-af-iface.sh.tpl" . | include "omec-pfcp-agent.template" | indent 4 }} |
| {{- end }} |
| run.sh: | |
| {{ tuple "bin/_pfcp-agent-run.sh.tpl" . | include "omec-pfcp-agent.template" | indent 4 }} |