blob: 72b9bd6172a173a0a5bc50ace355ebf3a06ab42b [file] [log] [blame]
{{/*
# Copyright 2018-present Open Networking Foundation
# Copyright 2018 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
*/}}
---
kind: ConfigMap
apiVersion: v1
metadata:
name: sriov-config
data:
config.json: |
{
"resourceList": [
{
"resourceName": "sriov_vfio_access_net",
"selectors": {
{{- if hasKey .Values.config.sriov.resourceList.vfio "accessPciAddresses" }}
"pciAddresses": {{ toJson .Values.config.sriov.resourceList.vfio.accessPciAddresses }}
{{- else if hasKey .Values.config.sriov.resourceList.vfio "accessPfNames" }}
"pfNames": {{ toJson .Values.config.sriov.resourceList.vfio.accessPfNames }},
"drivers": ["vfio-pci"]
{{- end }}
}
},
{
"resourceName": "sriov_vfio_core_net",
"selectors": {
{{- if hasKey .Values.config.sriov.resourceList.vfio "corePciAddresses" }}
"pciAddresses": {{ toJson .Values.config.sriov.resourceList.vfio.corePciAddresses }}
{{- else if hasKey .Values.config.sriov.resourceList.vfio "corePfNames" }}
"pfNames": {{ toJson .Values.config.sriov.resourceList.vfio.corePfNames }},
"drivers": ["vfio-pci"]
{{- end }}
}
}
{{- if hasKey .Values.config.sriov.resourceList "netDevice" }}
,
{
"resourceName": "sriov_netdevice",
"selectors": {
"pfNames": {{ toJson .Values.config.sriov.resourceList.netDevice.pfNames }},
"drivers": {{ toJson .Values.config.sriov.resourceList.netDevice.drivers }}
}
}
{{- end }}
]
}