blob: a5e5d7369817979ed791f3fa68f00d007ac9178e [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 Moon7ee8ae82021-08-14 18:21:59 -070014 k8s.v1.cni.cncf.io/resourceName: {{ .Values.config.upf.access.resourceName }}
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 }}
Hyunsun Moon0540f412021-08-13 01:08:57 -070026 {{- if eq .Values.config.upf.cniPlugin "host-device" }}
27 "device": {{ .Values.config.upf.access.iface | quote }},
28 {{- end }}
Jeremy Ronquillo223db002020-06-05 10:28:22 -070029 "ipam": {
Hyunsun Moon33d85312020-08-20 00:55:31 -070030 "type": {{ .Values.config.upf.ipam | quote }}
Hyunsun Moon1905a6e2020-11-09 05:59:55 +000031 },
32 "capabilities": { "mac": true}
Jeremy Ronquillo223db002020-06-05 10:28:22 -070033 }'
34---
35apiVersion: "k8s.cni.cncf.io/v1"
36kind: NetworkAttachmentDefinition
37metadata:
Hyunsun Moon33d85312020-08-20 00:55:31 -070038 name: core-net
39{{- if $.Values.config.upf.sriov.enabled }}
Jeremy Ronquillo223db002020-06-05 10:28:22 -070040 annotations:
Hyunsun Moon7ee8ae82021-08-14 18:21:59 -070041 k8s.v1.cni.cncf.io/resourceName: {{ .Values.config.upf.core.resourceName }}
Jeremy Ronquillo223db002020-06-05 10:28:22 -070042{{- end }}
43spec:
44 config: '{
Hyunsun Moond457d182020-09-10 15:52:09 -070045 "cniVersion": "0.3.1",
Hyunsun Moon16bd74e2021-05-20 18:18:25 -070046 {{- if hasKey .Values.config.upf.core "vlan" }}
47 "vlan": {{ .Values.config.upf.core.vlan }},
48 {{- end }}
Hyunsun Moon33d85312020-08-20 00:55:31 -070049 "type": {{ .Values.config.upf.cniPlugin | quote }},
Hyunsun Moon515ae5c2021-07-29 23:46:14 -070050 {{- if eq .Values.config.upf.cniPlugin "macvlan" }}
51 "master": {{ .Values.config.upf.core.iface | quote }},
52 {{- end }}
Hyunsun Moon0540f412021-08-13 01:08:57 -070053 {{- if eq .Values.config.upf.cniPlugin "host-device" }}
54 "device": {{ .Values.config.upf.core.iface | quote }},
55 {{- end }}
Jeremy Ronquillo223db002020-06-05 10:28:22 -070056 "ipam": {
Hyunsun Moon33d85312020-08-20 00:55:31 -070057 "type": {{ .Values.config.upf.ipam | quote }}
Hyunsun Moon1905a6e2020-11-09 05:59:55 +000058 },
59 "capabilities": { "mac": true}
Jeremy Ronquillo223db002020-06-05 10:28:22 -070060 }'