@@ -36,6 +36,8 @@ control of their devices using Virtual Machines and Containers.
3636- As a user, I would like to use my GPU dra driver with KubeVirt
3737- As a user, I would like to use KubeVirt's default driver
3838- As a developer, I would like APIs to be extensible so I can develop drivers/webhooks/automation for custom use-cases
39+ - As a device-plugin author, I would like to have an easy way to support KubeVirt
40+ - As a device-plugin author, I would like to have a common mechanism for exposing devices for containers and VMs
3941
4042## Use Cases
4143
@@ -176,12 +178,11 @@ currently handled by the design are:
1761782 . allowing the devices to be used as a host device (spec.domain.device.hostDevices)
177179
178180The status section of the VMI will contain information of the allocated devices for the VMI when the information is
179- available in DRA APIs. The same information will be accessible in virt-handler, virt-launcher and sidecar containers.
180- This allows for device information to flow from DRA APIs into KubeVirt stack.
181+ available in DRA APIs. The same information will be accessible in virt-handler and virt-launcher. This allows for device
182+ information to flow from DRA APIs into KubeVirt stack.
181183
182- The virt-launcher will have the logic of converting a GPU device into its corresponding domxml. For use-cases that are
183- not handled in-tree, a sidecar container could be envisioned which will convert the information available in status to
184- the corresponding domxml.
184+ The virt-launcher will have the logic of converting a GPU device into its corresponding domxml. For device-plugins it
185+ will look for env variables (current approach). For DRA devices, it will use the vmi status section to generate the xml
185186
186187### Examples
187188
@@ -219,8 +220,7 @@ metadata:
219220spec:
220221 resourceClaims:
221222 - name: pgpu-claim-name
222- source:
223- resourceClaimTemplateName: pgpu-claim-template
223+ resourceClaimTemplateName: pgpu-claim-template
224224 domain:
225225 devices:
226226 gpus:
@@ -311,8 +311,7 @@ spec:
311311 spec:
312312 resourceClaims:
313313 - name: nvme1-claim-name
314- source:
315- resourceClaimTemplateName: test-pci-claim-template
314+ resourceClaimTemplateName: test-pci-claim-template
316315 domain:
317316 devices:
318317 hostDevices:
@@ -451,7 +450,7 @@ spec:
451450
452451### Web hook changes
4534521 . Allow DRA devices to be requested only if the corresponding DRA feature gate is enabled in kubevirt configuration
454- Note: All the following sections will assume that DRA feture gate is enabled
453+ Note: All the following sections will assume that DRA feature gate is enabled
455454
456455### Virt controller changes
457456
@@ -469,7 +468,7 @@ Note: All the following sections will assume that DRA feture gate is enabled
4694681 . For devices generated using DRA, virt-launcher needs to use the vmi.status.deviceStatus to generate the domxml
470469 instead of environment variables as in the case of device-plugins
4714701 . The standard env variables ` PCI_RESOURCE_<deviceName> ` and ` MDEV_PCI_RESOURCE_<deviceName> ` may continue to be set
472- as fallback mechanisms but the focus here is to ensure we can consume the device PCIe bus address atrribute from the
471+ as fallback mechanisms but the focus here is to ensure we can consume the device PCIe bus address attribute from the
473472 allocated devices in virt-launcher to generate the domxml.
4744731 . Both GPU and HostDevice devices requested in the domain spec will have corresponding entries in the VMI status
475474 at ` status.deviceStatus.gpuStatuses[*] ` /` status.deviceStatus.hostDeviceStatuses[*] ` . From here, the relevant
0 commit comments