blob: 9548b189174ded57b2c938546f55ef41f75e20ea [file] [log] [blame]
{{/*
# Copyright 2020-present Open Networking Foundation
# SPDX-License-Identifier: Apache-2.0
*/}}
apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
name: {{ .Values.multusNetworkName }}
annotations:
k8s.v1.cni.cncf.io/resourceName: intel.com/{{ .Values.sriovResourceName }}
spec:
config: '{
"type": "sriov",
"name": "sriov-network",
{{- if hasKey .Values.network "vlan" }}
"vlan": {{ .Values.network.vlan }},
{{- end }}
"ipam": {
{{- if eq .Values.network.ipam "host-local" }}
"type": "host-local",
"subnet": "{{ .Values.network.static.subnets }}",
"routes": [{
"dst": "0.0.0.0/0"
}],
"gateway": "{{ .Values.network.static.gateway }}"
{{- else if eq .Values.network.ipam "dhcp" }}
"type": "dhcp"
{{- end }}
}
}'