Get desktop application:
View/edit binary Protocol Buffers messages
DevicePlugin is the service advertised by Device Plugins
GetDevicePluginOptions returns options to be communicated with Device Manager
ListAndWatch returns a stream of List of Devices Whenever a Device state change or a Device disappears, ListAndWatch returns the new list
ListAndWatch returns a stream of List of Devices Whenever a Device state change or a Device disappears, ListAndWatch returns the new list
GetPreferredAllocation returns a preferred set of devices to allocate from a list of available ones. The resulting preferred allocation is not guaranteed to be the allocation ultimately performed by the devicemanager. It is only designed to help the devicemanager make a more informed allocation decision when possible.
PreferredAllocationRequest is passed via a call to GetPreferredAllocation() at pod admission time. The device plugin should take the list of `available_deviceIDs` and calculate a preferred allocation of size 'allocation_size' from them, making sure to include the set of devices listed in 'must_include_deviceIDs'.
PreferredAllocationResponse returns a preferred allocation, resulting from a PreferredAllocationRequest.
Allocate is called during container creation so that the Device Plugin can run device specific operations and instruct Kubelet of the steps to make the Device available in the container
- Allocate is expected to be called during pod creation since allocation failures for any container would result in pod startup failure. - Allocate allows kubelet to exposes additional artifacts in a pod's environment as directed by the plugin. - Allocate allows Device Plugin to run device specific operations on the Devices requested
AllocateResponse includes the artifacts that needs to be injected into a container for accessing 'deviceIDs' that were mentioned as part of 'AllocateRequest'. Failure Handling: if Kubelet sends an allocation request for dev1 and dev2. Allocation on dev1 succeeds but allocation on dev2 fails. The Device plugin should send a ListAndWatch update and fail the Allocation request
PreStartContainer is called, if indicated by Device Plugin during registeration phase, before each container start. Device plugin can run device specific operations such as resetting the device before making devices available to the container
- PreStartContainer is expected to be called before each container start if indicated by plugin during registration phase. - PreStartContainer allows kubelet to pass reinitialized devices to containers. - PreStartContainer allows Device Plugin to run device specific operations on the Devices requested
PreStartContainerResponse will be send by plugin in response to PreStartContainerRequest
(message has no fields)
Registration is the service advertised by the Kubelet Only when Kubelet answers with a success code to a Register Request may Device Plugins start their service Registration may fail when device plugin version is not supported by Kubelet or the registered resourceName is already taken by another active device plugin. Device plugin is expected to terminate upon registration failure
Version of the API the Device Plugin was built against
Name of the unix socket the device plugin is listening on PATH = path.Join(DevicePluginPath, endpoint)
Schedulable resource name. As of now it's expected to be a DNS Label
Options to be communicated with Device Manager
Used in:
Used in:
List of environment variable to be set in the container to access one of more devices.
Mounts for the container.
Devices for the container.
Container annotations to pass to the container runtime
Used in:
List of available deviceIDs from which to choose a preferred allocation
List of deviceIDs that must be included in the preferred allocation
Number of devices to include in the preferred allocation
Used in:
E.g: struct Device { ID: "GPU-fef8089b-4820-abfc-e83e-94318197576e", Health: "Healthy", Topology: Node: ID: 1 }
Used in:
A unique ID assigned by the device plugin used to identify devices during the communication Max length of this field is 63 characters
Health of the device, can be healthy or unhealthy, see constants.go
Topology for device
Used as response type in: DevicePlugin.GetDevicePluginOptions
Used as field type in:
Indicates if PreStartContainer call is required before each container start
Indicates if GetPreferredAllocation is implemented and available for calling
DeviceSpec specifies a host device to mount into a container.
Used in:
Path of the device within the container.
Path of the device on the host.
Cgroups permissions of the device, candidates are one or more of * r - allows container to read from the specified device. * w - allows container to write to the specified device. * m - allows container to create device files that do not yet exist.
Used as request type in: DevicePlugin.GetDevicePluginOptions, DevicePlugin.ListAndWatch
Used as response type in: Registration.Register
(message has no fields)
Mount specifies a host volume to mount into a container. where device library or tools are installed on host and container
Used in:
Path of the mount within the container.
Path of the mount on the host.
If set, the mount is read-only.
Used in:
Used in: