blob: 84e0cf5e233d9051610f1d983eede7a824c09dfe [file] [log] [blame]
pudelkoM3f0efb12021-01-12 13:55:48 -08001{{/*
2# Copyright 2020-present Open Networking Foundation
3
4# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
5*/}}
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",
Hyunsun Moon4c29f1d2021-05-21 10:27:15 -070017{{- if hasKey .Values.network "vlan" }}
18 "vlan": {{ .Values.network.vlan }},
19{{- end }}
pudelkoM3f0efb12021-01-12 13:55:48 -080020 "ipam": {
Hung-Wei Chiu9de579b2021-02-03 12:39:22 -080021 {{- if eq .Values.network.ipam "host-local" }}
pudelkoM3f0efb12021-01-12 13:55:48 -080022 "type": "host-local",
Hung-Wei Chiu9de579b2021-02-03 12:39:22 -080023 "subnet": "{{ .Values.network.static.subnets }}",
pudelkoM3f0efb12021-01-12 13:55:48 -080024 "routes": [{
25 "dst": "0.0.0.0/0"
26 }],
Hung-Wei Chiu9de579b2021-02-03 12:39:22 -080027 "gateway": "{{ .Values.network.static.gateway }}"
28 {{- else if eq .Values.network.ipam "dhcp" }}
29 "type": "dhcp"
30
31 {{- end }}
pudelkoM3f0efb12021-01-12 13:55:48 -080032 }
Hyunsun Moon4c29f1d2021-05-21 10:27:15 -070033}'