blob: 07eb55b5c583167a30348117bfbb68fc12d66baa [file] [log] [blame]
{{/*
# Copyright 2020-present Open Networking Foundation
# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.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",
"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 }}
}
}'