Skip to content

Commit

Permalink
Enable capability to set cniplugin per interface (#39)
Browse files Browse the repository at this point in the history
Signed-off-by: Arrobo, Gabriel <[email protected]>
  • Loading branch information
gab-arrobo authored Jun 25, 2024
1 parent 63be366 commit 4de7c6a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
16 changes: 8 additions & 8 deletions bess-upf/templates/networks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ spec:
{{- if hasKey .Values.config.upf.access "vlan" }}
"vlan": {{ .Values.config.upf.access.vlan }},
{{- end }}
"type": {{ .Values.config.upf.cniPlugin | quote }},
{{- if eq .Values.config.upf.cniPlugin "macvlan" }}
"type": {{ .Values.config.upf.access.cniPlugin | quote }},
{{- if eq .Values.config.upf.access.cniPlugin "macvlan" }}
"master": {{ .Values.config.upf.access.iface | quote }},
{{- end }}
{{- if eq .Values.config.upf.cniPlugin "host-device" }}
{{- if eq .Values.config.upf.access.cniPlugin "host-device" }}
"device": {{ .Values.config.upf.access.iface | quote }},
{{- end }}
"ipam": {
"type": {{ .Values.config.upf.ipam | quote }}
"type": {{ .Values.config.upf.access.ipam | quote }}
},
"capabilities": { "mac": true}
}'
Expand All @@ -46,15 +46,15 @@ spec:
{{- if hasKey .Values.config.upf.core "vlan" }}
"vlan": {{ .Values.config.upf.core.vlan }},
{{- end }}
"type": {{ .Values.config.upf.cniPlugin | quote }},
{{- if eq .Values.config.upf.cniPlugin "macvlan" }}
"type": {{ .Values.config.upf.core.cniPlugin | quote }},
{{- if eq .Values.config.upf.core.cniPlugin "macvlan" }}
"master": {{ .Values.config.upf.core.iface | quote }},
{{- end }}
{{- if eq .Values.config.upf.cniPlugin "host-device" }}
{{- if eq .Values.config.upf.core.cniPlugin "host-device" }}
"device": {{ .Values.config.upf.core.iface | quote }},
{{- end }}
"ipam": {
"type": {{ .Values.config.upf.ipam | quote }}
"type": {{ .Values.config.upf.core.ipam | quote }}
},
"capabilities": { "mac": true}
}'
6 changes: 4 additions & 2 deletions bess-upf/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,15 @@ config:
sriov:
enabled: true
# Dynamic IP allocation is not supported yet
ipam: static
# Custom routes inside UPF
#routes:
# - to: 10.76.28.173/32
# via: 169.254.1.1
cniPlugin: vfioveth
enb:
subnet: 192.168.251.0/24
access:
ipam: static
cniPlugin: vfioveth
# Provide sriov resource name when sriov is enabled
resourceName: "intel.com/intel_sriov_vfio"
gateway: 192.168.252.1
Expand All @@ -86,6 +86,8 @@ config:
#vlan:
#iface:
core:
ipam: static
cniPlugin: vfioveth
# Provide sriov resource name when sriov is enabled
resourceName: "intel.com/intel_sriov_vfio"
gateway: 192.168.250.1
Expand Down

0 comments on commit 4de7c6a

Please sign in to comment.