blob: 500ab13c0dd520ababa9082f781058c29d5155db [file] [log] [blame]
Jeremy Ronquillo223db002020-06-05 10:28:22 -07001{{/*
Jeremy Ronquilloec2d3e42020-06-05 11:33:39 -07002# Copyright 2020-present Open Networking Foundation
Jeremy Ronquillo223db002020-06-05 10:28:22 -07003
Jeremy Ronquillo6046ce32020-06-18 11:06:29 -07004# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
Jeremy Ronquillo223db002020-06-05 10:28:22 -07005*/}}
6
7---
8apiVersion: "k8s.cni.cncf.io/v1"
9kind: NetworkAttachmentDefinition
10metadata:
Hyunsun Moon33d85312020-08-20 00:55:31 -070011 name: access-net
12{{- if $.Values.config.upf.sriov.enabled }}
Jeremy Ronquillo223db002020-06-05 10:28:22 -070013 annotations:
Hyunsun Moon6575f7e2021-05-19 16:55:42 -070014 k8s.v1.cni.cncf.io/resourceName: intel.com/intel_sriov_vfio
Jeremy Ronquillo223db002020-06-05 10:28:22 -070015{{- end }}
16spec:
17 config: '{
Hyunsun Moond457d182020-09-10 15:52:09 -070018 "cniVersion": "0.3.1",
Hyunsun Moon16bd74e2021-05-20 18:18:25 -070019 {{- if hasKey .Values.config.upf.access "vlan" }}
20 "vlan": {{ .Values.config.upf.access.vlan }},
21 {{- end }}
Hyunsun Moon33d85312020-08-20 00:55:31 -070022 "type": {{ .Values.config.upf.cniPlugin | quote }},
Hyunsun Moon515ae5c2021-07-29 23:46:14 -070023 {{- if eq .Values.config.upf.cniPlugin "macvlan" }}
24 "master": {{ .Values.config.upf.access.iface | quote }},
25 {{- end }}
Jeremy Ronquillo223db002020-06-05 10:28:22 -070026 "ipam": {
Hyunsun Moon33d85312020-08-20 00:55:31 -070027 "type": {{ .Values.config.upf.ipam | quote }}
Hyunsun Moon1905a6e2020-11-09 05:59:55 +000028 },
29 "capabilities": { "mac": true}
Jeremy Ronquillo223db002020-06-05 10:28:22 -070030 }'
31---
32apiVersion: "k8s.cni.cncf.io/v1"
33kind: NetworkAttachmentDefinition
34metadata:
Hyunsun Moon33d85312020-08-20 00:55:31 -070035 name: core-net
36{{- if $.Values.config.upf.sriov.enabled }}
Jeremy Ronquillo223db002020-06-05 10:28:22 -070037 annotations:
Hyunsun Moon6575f7e2021-05-19 16:55:42 -070038 k8s.v1.cni.cncf.io/resourceName: intel.com/intel_sriov_vfio
Jeremy Ronquillo223db002020-06-05 10:28:22 -070039{{- end }}
40spec:
41 config: '{
Hyunsun Moond457d182020-09-10 15:52:09 -070042 "cniVersion": "0.3.1",
Hyunsun Moon16bd74e2021-05-20 18:18:25 -070043 {{- if hasKey .Values.config.upf.core "vlan" }}
44 "vlan": {{ .Values.config.upf.core.vlan }},
45 {{- end }}
Hyunsun Moon33d85312020-08-20 00:55:31 -070046 "type": {{ .Values.config.upf.cniPlugin | quote }},
Hyunsun Moon515ae5c2021-07-29 23:46:14 -070047 {{- if eq .Values.config.upf.cniPlugin "macvlan" }}
48 "master": {{ .Values.config.upf.core.iface | quote }},
49 {{- end }}
Jeremy Ronquillo223db002020-06-05 10:28:22 -070050 "ipam": {
Hyunsun Moon33d85312020-08-20 00:55:31 -070051 "type": {{ .Values.config.upf.ipam | quote }}
Hyunsun Moon1905a6e2020-11-09 05:59:55 +000052 },
53 "capabilities": { "mac": true}
Jeremy Ronquillo223db002020-06-05 10:28:22 -070054 }'