Charles Chan | e1e5e62 | 2022-02-16 15:17:05 -0800 | [diff] [blame] | 1 | {{/* |
| 2 | # Copyright 2020-present Open Networking Foundation |
| 3 | |
| 4 | # SPDX-License-Identifier: Apache-2.0 |
| 5 | */}} |
| 6 | |
| 7 | --- |
| 8 | apiVersion: "k8s.cni.cncf.io/v1" |
| 9 | kind: NetworkAttachmentDefinition |
| 10 | metadata: |
| 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 }} |
| 16 | spec: |
| 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 | --- |
| 35 | apiVersion: "k8s.cni.cncf.io/v1" |
| 36 | kind: NetworkAttachmentDefinition |
| 37 | metadata: |
| 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 }} |
| 43 | spec: |
| 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 | }' |