blob: 9548b189174ded57b2c938546f55ef41f75e20ea [file] [log] [blame]
Yi Tseng32561422021-10-07 15:03:21 -07001{{/*
2# Copyright 2020-present Open Networking Foundation
3
Charles Chand1b4bf92022-02-02 16:27:10 -08004# SPDX-License-Identifier: Apache-2.0
Yi Tseng32561422021-10-07 15:03:21 -07005*/}}
6
7apiVersion: "k8s.cni.cncf.io/v1"
8kind: NetworkAttachmentDefinition
9metadata:
10 name: {{ .Values.multusNetworkName }}
11 annotations:
12 k8s.v1.cni.cncf.io/resourceName: intel.com/{{ .Values.sriovResourceName }}
13spec:
14 config: '{
15 "type": "sriov",
16 "name": "sriov-network",
17{{- if hasKey .Values.network "vlan" }}
18 "vlan": {{ .Values.network.vlan }},
19{{- end }}
20 "ipam": {
21 {{- if eq .Values.network.ipam "host-local" }}
22 "type": "host-local",
23 "subnet": "{{ .Values.network.static.subnets }}",
24 "routes": [{
25 "dst": "0.0.0.0/0"
26 }],
27 "gateway": "{{ .Values.network.static.gateway }}"
28 {{- else if eq .Values.network.ipam "dhcp" }}
29 "type": "dhcp"
30
31 {{- end }}
32 }
33}'