blob: 7f731e9e427a8a98f145e4961d40b5551caa4ac3 [file] [log] [blame]
Charles Chane1e5e622022-02-16 15:17:05 -08001{{/*
2# Copyright 2020-present Open Networking Foundation
3
4# SPDX-License-Identifier: Apache-2.0
5*/}}
6
7---
8apiVersion: "k8s.cni.cncf.io/v1"
9kind: NetworkAttachmentDefinition
10metadata:
11 name: access-net
12{{- if $.Values.config.upf.sriov.enabled }}
13 annotations:
14 k8s.v1.cni.cncf.io/resourceName: {{ .Values.config.upf.access.resourceName }}
15{{- end }}
16spec:
17 config: '{
18 "cniVersion": "0.3.1",
19 {{- if hasKey .Values.config.upf.access "vlan" }}
20 "vlan": {{ .Values.config.upf.access.vlan }},
21 {{- end }}
22 "type": {{ .Values.config.upf.cniPlugin | quote }},
23 {{- if eq .Values.config.upf.cniPlugin "macvlan" }}
24 "master": {{ .Values.config.upf.access.iface | quote }},
25 {{- end }}
26 {{- if eq .Values.config.upf.cniPlugin "host-device" }}
27 "device": {{ .Values.config.upf.access.iface | quote }},
28 {{- end }}
29 "ipam": {
30 "type": {{ .Values.config.upf.ipam | quote }}
31 },
32 "capabilities": { "mac": true}
33 }'
34---
35apiVersion: "k8s.cni.cncf.io/v1"
36kind: NetworkAttachmentDefinition
37metadata:
38 name: core-net
39{{- if $.Values.config.upf.sriov.enabled }}
40 annotations:
41 k8s.v1.cni.cncf.io/resourceName: {{ .Values.config.upf.core.resourceName }}
42{{- end }}
43spec:
44 config: '{
45 "cniVersion": "0.3.1",
46 {{- if hasKey .Values.config.upf.core "vlan" }}
47 "vlan": {{ .Values.config.upf.core.vlan }},
48 {{- end }}
49 "type": {{ .Values.config.upf.cniPlugin | quote }},
50 {{- if eq .Values.config.upf.cniPlugin "macvlan" }}
51 "master": {{ .Values.config.upf.core.iface | quote }},
52 {{- end }}
53 {{- if eq .Values.config.upf.cniPlugin "host-device" }}
54 "device": {{ .Values.config.upf.core.iface | quote }},
55 {{- end }}
56 "ipam": {
57 "type": {{ .Values.config.upf.ipam | quote }}
58 },
59 "capabilities": { "mac": true}
60 }'