Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 1 | {{/* |
Jeremy Ronquillo | ec2d3e4 | 2020-06-05 11:33:39 -0700 | [diff] [blame] | 2 | # Copyright 2020-present Open Networking Foundation |
Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 3 | |
Jeremy Ronquillo | 6046ce3 | 2020-06-18 11:06:29 -0700 | [diff] [blame] | 4 | # SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0 |
Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 5 | */}} |
| 6 | |
| 7 | --- |
| 8 | apiVersion: "k8s.cni.cncf.io/v1" |
| 9 | kind: NetworkAttachmentDefinition |
| 10 | metadata: |
Hyunsun Moon | 33d8531 | 2020-08-20 00:55:31 -0700 | [diff] [blame] | 11 | name: access-net |
| 12 | {{- if $.Values.config.upf.sriov.enabled }} |
Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 13 | annotations: |
Hyunsun Moon | 6575f7e | 2021-05-19 16:55:42 -0700 | [diff] [blame] | 14 | k8s.v1.cni.cncf.io/resourceName: intel.com/intel_sriov_vfio |
Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 15 | {{- end }} |
| 16 | spec: |
| 17 | config: '{ |
Hyunsun Moon | d457d18 | 2020-09-10 15:52:09 -0700 | [diff] [blame] | 18 | "cniVersion": "0.3.1", |
Hyunsun Moon | 16bd74e | 2021-05-20 18:18:25 -0700 | [diff] [blame] | 19 | {{- if hasKey .Values.config.upf.access "vlan" }} |
| 20 | "vlan": {{ .Values.config.upf.access.vlan }}, |
| 21 | {{- end }} |
Hyunsun Moon | 33d8531 | 2020-08-20 00:55:31 -0700 | [diff] [blame] | 22 | "type": {{ .Values.config.upf.cniPlugin | quote }}, |
Hyunsun Moon | 515ae5c | 2021-07-29 23:46:14 -0700 | [diff] [blame] | 23 | {{- if eq .Values.config.upf.cniPlugin "macvlan" }} |
| 24 | "master": {{ .Values.config.upf.access.iface | quote }}, |
| 25 | {{- end }} |
Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 26 | "ipam": { |
Hyunsun Moon | 33d8531 | 2020-08-20 00:55:31 -0700 | [diff] [blame] | 27 | "type": {{ .Values.config.upf.ipam | quote }} |
Hyunsun Moon | 1905a6e | 2020-11-09 05:59:55 +0000 | [diff] [blame] | 28 | }, |
| 29 | "capabilities": { "mac": true} |
Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 30 | }' |
| 31 | --- |
| 32 | apiVersion: "k8s.cni.cncf.io/v1" |
| 33 | kind: NetworkAttachmentDefinition |
| 34 | metadata: |
Hyunsun Moon | 33d8531 | 2020-08-20 00:55:31 -0700 | [diff] [blame] | 35 | name: core-net |
| 36 | {{- if $.Values.config.upf.sriov.enabled }} |
Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 37 | annotations: |
Hyunsun Moon | 6575f7e | 2021-05-19 16:55:42 -0700 | [diff] [blame] | 38 | k8s.v1.cni.cncf.io/resourceName: intel.com/intel_sriov_vfio |
Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 39 | {{- end }} |
| 40 | spec: |
| 41 | config: '{ |
Hyunsun Moon | d457d18 | 2020-09-10 15:52:09 -0700 | [diff] [blame] | 42 | "cniVersion": "0.3.1", |
Hyunsun Moon | 16bd74e | 2021-05-20 18:18:25 -0700 | [diff] [blame] | 43 | {{- if hasKey .Values.config.upf.core "vlan" }} |
| 44 | "vlan": {{ .Values.config.upf.core.vlan }}, |
| 45 | {{- end }} |
Hyunsun Moon | 33d8531 | 2020-08-20 00:55:31 -0700 | [diff] [blame] | 46 | "type": {{ .Values.config.upf.cniPlugin | quote }}, |
Hyunsun Moon | 515ae5c | 2021-07-29 23:46:14 -0700 | [diff] [blame] | 47 | {{- if eq .Values.config.upf.cniPlugin "macvlan" }} |
| 48 | "master": {{ .Values.config.upf.core.iface | quote }}, |
| 49 | {{- end }} |
Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 50 | "ipam": { |
Hyunsun Moon | 33d8531 | 2020-08-20 00:55:31 -0700 | [diff] [blame] | 51 | "type": {{ .Values.config.upf.ipam | quote }} |
Hyunsun Moon | 1905a6e | 2020-11-09 05:59:55 +0000 | [diff] [blame] | 52 | }, |
| 53 | "capabilities": { "mac": true} |
Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 54 | }' |