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 | 7ee8ae8 | 2021-08-14 18:21:59 -0700 | [diff] [blame] | 14 | k8s.v1.cni.cncf.io/resourceName: {{ .Values.config.upf.access.resourceName }} |
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 }} |
Hyunsun Moon | 0540f41 | 2021-08-13 01:08:57 -0700 | [diff] [blame] | 26 | {{- if eq .Values.config.upf.cniPlugin "host-device" }} |
| 27 | "device": {{ .Values.config.upf.access.iface | quote }}, |
| 28 | {{- end }} |
Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 29 | "ipam": { |
Hyunsun Moon | 33d8531 | 2020-08-20 00:55:31 -0700 | [diff] [blame] | 30 | "type": {{ .Values.config.upf.ipam | quote }} |
Hyunsun Moon | 1905a6e | 2020-11-09 05:59:55 +0000 | [diff] [blame] | 31 | }, |
| 32 | "capabilities": { "mac": true} |
Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 33 | }' |
| 34 | --- |
| 35 | apiVersion: "k8s.cni.cncf.io/v1" |
| 36 | kind: NetworkAttachmentDefinition |
| 37 | metadata: |
Hyunsun Moon | 33d8531 | 2020-08-20 00:55:31 -0700 | [diff] [blame] | 38 | name: core-net |
| 39 | {{- if $.Values.config.upf.sriov.enabled }} |
Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 40 | annotations: |
Hyunsun Moon | 7ee8ae8 | 2021-08-14 18:21:59 -0700 | [diff] [blame] | 41 | k8s.v1.cni.cncf.io/resourceName: {{ .Values.config.upf.core.resourceName }} |
Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 42 | {{- end }} |
| 43 | spec: |
| 44 | config: '{ |
Hyunsun Moon | d457d18 | 2020-09-10 15:52:09 -0700 | [diff] [blame] | 45 | "cniVersion": "0.3.1", |
Hyunsun Moon | 16bd74e | 2021-05-20 18:18:25 -0700 | [diff] [blame] | 46 | {{- if hasKey .Values.config.upf.core "vlan" }} |
| 47 | "vlan": {{ .Values.config.upf.core.vlan }}, |
| 48 | {{- end }} |
Hyunsun Moon | 33d8531 | 2020-08-20 00:55:31 -0700 | [diff] [blame] | 49 | "type": {{ .Values.config.upf.cniPlugin | quote }}, |
Hyunsun Moon | 515ae5c | 2021-07-29 23:46:14 -0700 | [diff] [blame] | 50 | {{- if eq .Values.config.upf.cniPlugin "macvlan" }} |
| 51 | "master": {{ .Values.config.upf.core.iface | quote }}, |
| 52 | {{- end }} |
Hyunsun Moon | 0540f41 | 2021-08-13 01:08:57 -0700 | [diff] [blame] | 53 | {{- if eq .Values.config.upf.cniPlugin "host-device" }} |
| 54 | "device": {{ .Values.config.upf.core.iface | quote }}, |
| 55 | {{- end }} |
Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 56 | "ipam": { |
Hyunsun Moon | 33d8531 | 2020-08-20 00:55:31 -0700 | [diff] [blame] | 57 | "type": {{ .Values.config.upf.ipam | quote }} |
Hyunsun Moon | 1905a6e | 2020-11-09 05:59:55 +0000 | [diff] [blame] | 58 | }, |
| 59 | "capabilities": { "mac": true} |
Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 60 | }' |