Add DP_NAME in DP ENV
Change-Id: I716292c5411813f61ea519914c54557139a3000c
diff --git a/omec/omec-control-plane/Chart.yaml b/omec/omec-control-plane/Chart.yaml
index 30b8654..c228a6a 100644
--- a/omec/omec-control-plane/Chart.yaml
+++ b/omec/omec-control-plane/Chart.yaml
@@ -19,4 +19,4 @@
name: omec-control-plane
icon: https://guide.opencord.org/logos/cord.svg
-version: 0.1.14
+version: 0.1.15
diff --git a/omec/omec-control-plane/templates/bin/_spgwc-run.sh.tpl b/omec/omec-control-plane/templates/bin/_spgwc-run.sh.tpl
index d08c7b0..cd61eac 100644
--- a/omec/omec-control-plane/templates/bin/_spgwc-run.sh.tpl
+++ b/omec/omec-control-plane/templates/bin/_spgwc-run.sh.tpl
@@ -18,7 +18,7 @@
mkdir -p /opt/cp/config
cd /opt/cp/config
-cp /etc/cp/config/{adc_rules.cfg,cp_config.cfg,interface.cfg,meter_profile.cfg,pcc_rules.cfg,sdf_rules.cfg} .
+cp /etc/cp/config/{adc_rules.cfg,cp_config.cfg,interface.cfg,meter_profile.cfg,pcc_rules.cfg,sdf_rules.cfg,app_config.cfg} .
sed -i "s/CP_ADDR/$POD_IP/g" interface.cfg
diff --git a/omec/omec-control-plane/values.yaml b/omec/omec-control-plane/values.yaml
index de131b3..f94085a 100644
--- a/omec/omec-control-plane/values.yaml
+++ b/omec/omec-control-plane/values.yaml
@@ -252,6 +252,21 @@
port: 20
cfgFiles:
# See https://github.com/omec-project/ngic-rtc/tree/master/config for details
+ app_config.cfg: |
+ [GLOBAL]
+ NUM_DP_SELECTION_RULES = 2
+ [DP_SELECTION_RULE_1]
+ DPID = 1
+ DPNAME = dp1
+ MCC = 315
+ MNC = 010
+ TAC = 202
+ [DP_SELECTION_RULE_2]
+ DPID = 2
+ DPNAME = dp2
+ MCC = 315
+ MNC = 010
+ TAC = 203
adc_rules.cfg: |
[GLOBAL]
NUM_ADC_RULES = 0
diff --git a/omec/omec-data-plane/Chart.yaml b/omec/omec-data-plane/Chart.yaml
index 1510a0b..bd25cda 100644
--- a/omec/omec-data-plane/Chart.yaml
+++ b/omec/omec-data-plane/Chart.yaml
@@ -19,4 +19,4 @@
name: omec-data-plane
icon: https://guide.opencord.org/logos/cord.svg
-version: 0.1.7
+version: 0.1.8
diff --git a/omec/omec-data-plane/templates/statefulset-spgwu.yaml b/omec/omec-data-plane/templates/statefulset-spgwu.yaml
index 07f9082..35b6304 100644
--- a/omec/omec-data-plane/templates/statefulset-spgwu.yaml
+++ b/omec/omec-data-plane/templates/statefulset-spgwu.yaml
@@ -92,6 +92,8 @@
valueFrom:
fieldRef:
fieldPath: status.podIP
+ - name: DP_NAME
+ value: "{{ .Values.config.spgwu.dpName }}"
command: ["bash", "-xc"]
args:
- ip a;
diff --git a/omec/omec-data-plane/values.yaml b/omec/omec-data-plane/values.yaml
index 0089751..c2512cc 100644
--- a/omec/omec-data-plane/values.yaml
+++ b/omec/omec-data-plane/values.yaml
@@ -67,6 +67,7 @@
# Set "--no-pci --vdev eth_af_packet0,iface=s1u-net --vdev eth_af_packet1,iface=sgi-net"
# when sriov is disabled
devices: ""
+ dpName: "dp1"
networks:
cniPlugin: vfioveth