AETHER-2063 Allow specifying SRIOV resource name for each of UPF user plane interfaces

Change-Id: I755f08eeca2462c22ac2c8f0a5f65a17556fcd67
diff --git a/omec/omec-user-plane/Chart.yaml b/omec/omec-user-plane/Chart.yaml
index 91c217a..e529773 100644
--- a/omec/omec-user-plane/Chart.yaml
+++ b/omec/omec-user-plane/Chart.yaml
@@ -7,4 +7,4 @@
 name: omec-user-plane
 icon: https://guide.opencord.org/logos/cord.svg
 
-version: 0.3.29
+version: 0.3.30
diff --git a/omec/omec-user-plane/templates/networks.yaml b/omec/omec-user-plane/templates/networks.yaml
index cac4e18..a5e5d73 100644
--- a/omec/omec-user-plane/templates/networks.yaml
+++ b/omec/omec-user-plane/templates/networks.yaml
@@ -11,7 +11,7 @@
   name: access-net
 {{- if $.Values.config.upf.sriov.enabled }}
   annotations:
-    k8s.v1.cni.cncf.io/resourceName: {{ .Values.config.upf.sriov.resourceName }}
+    k8s.v1.cni.cncf.io/resourceName: {{ .Values.config.upf.access.resourceName }}
 {{- end }}
 spec:
   config: '{
@@ -38,7 +38,7 @@
   name: core-net
 {{- if $.Values.config.upf.sriov.enabled }}
   annotations:
-    k8s.v1.cni.cncf.io/resourceName: {{ .Values.config.upf.sriov.resourceName }}
+    k8s.v1.cni.cncf.io/resourceName: {{ .Values.config.upf.core.resourceName }}
 {{- end }}
 spec:
   config: '{
diff --git a/omec/omec-user-plane/templates/statefulset-upf.yaml b/omec/omec-user-plane/templates/statefulset-upf.yaml
index 303f27b..8bf1cf8 100644
--- a/omec/omec-user-plane/templates/statefulset-upf.yaml
+++ b/omec/omec-user-plane/templates/statefulset-upf.yaml
@@ -107,7 +107,12 @@
             hugepages-1Gi: 2Gi
           {{- end }}
           {{- if .Values.config.upf.sriov.enabled }}
-            {{ .Values.config.upf.sriov.resourceName }}: 2
+          {{- if eq .Values.config.upf.access.resourceName .Values.config.upf.core.resourceName }}
+            {{ .Values.config.upf.access.resourceName }}: 2
+          {{- else }}
+            {{ .Values.config.upf.access.resourceName }}: 1
+            {{ .Values.config.upf.core.resourceName }}: 1
+          {{- end }}
           {{- end }}
           limits:
           {{- if .Values.resources.enabled }}
@@ -117,7 +122,12 @@
             hugepages-1Gi: 2Gi
           {{- end }}
           {{- if .Values.config.upf.sriov.enabled }}
-            {{ .Values.config.upf.sriov.resourceName }}: 2
+          {{- if eq .Values.config.upf.access.resourceName .Values.config.upf.core.resourceName }}
+            {{ .Values.config.upf.access.resourceName }}: 2
+          {{- else }}
+            {{ .Values.config.upf.access.resourceName }}: 1
+            {{ .Values.config.upf.core.resourceName }}: 1
+          {{- end }}
           {{- end }}
         env:
           - name: CONF_FILE
diff --git a/omec/omec-user-plane/values.yaml b/omec/omec-user-plane/values.yaml
index 1834e8e..b960317 100644
--- a/omec/omec-user-plane/values.yaml
+++ b/omec/omec-user-plane/values.yaml
@@ -60,19 +60,22 @@
       enabled: true
     sriov:
       enabled: true
-      resourceName: "intel.com/intel_sriov_vfio"
     # Dynamic IP allocation is not supported yet
     ipam: static
     cniPlugin: vfioveth
     enb:
       subnet: 192.168.251.0/24
     access:
+      # Provide sriov resource name when sriov is enabled
+      resourceName: "intel.com/intel_sriov_vfio_access"
       gateway: 192.168.252.1
       ip: 192.168.252.3/24
       #mac:
       #vlan:
       #iface:
     core:
+      # Provide sriov resource name when sriov is enabled
+      resourceName: "intel.com/intel_sriov_vfio_core"
       gateway: 192.168.250.1
       ip: 192.168.250.3/24
       #mac: