Module v1beta1

Source

Modules§

device_plugin_client
Generated client implementations.
device_plugin_server
Generated server implementations.
registration_client
Generated client implementations.
registration_server
Generated server implementations.

Structs§

AllocateRequest
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
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
ContainerAllocateRequest
ContainerAllocateResponse
ContainerPreferredAllocationRequest
ContainerPreferredAllocationResponse
Device
E.g: struct Device { ID: “GPU-fef8089b-4820-abfc-e83e-94318197576e”, Health: “Healthy”, Topology: Node: ID: 1 }
DevicePluginOptions
DeviceSpec
DeviceSpec specifies a host device to mount into a container.
Empty
ListAndWatchResponse
ListAndWatch returns a stream of List of Devices Whenever a Device state change or a Device disappears, ListAndWatch returns the new list
Mount
Mount specifies a host volume to mount into a container. where device library or tools are installed on host and container
NumaNode
PreStartContainerRequest
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
PreStartContainerResponse will be send by plugin in response to PreStartContainerRequest
PreferredAllocationRequest
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
PreferredAllocationResponse returns a preferred allocation, resulting from a PreferredAllocationRequest.
RegisterRequest
TopologyInfo

Constants§

DEVICE_PLUGIN_PATH
The folder the Device Plugin is expecting sockets to be on. Only privileged pods have access to this path. Note: Placeholder until we find a “standard path”.
DEVICE_PLUGIN_WINDOWS
Avoid failed to run kubelet: bad socketPath, must be an absolute path: /var/lib/kubelet/device-plugins/kubelet.sock https://github.com/kubernetes/kubernetes/issues/93262 https://github.com/kubernetes/kubernetes/pull/93285#discussion_r458140701
HEALTHY
Means that the device is healthy.
KUBELET_PRE_START_CONTAINER_RPC_TIMEOUT_IN_SECS
Timeout duration in secs for PreStartContainer RPC.
KUBELET_SOCKET
The path of the kubelet registry socket.
KUBELET_SOCKET_WINDOWS
The path of the Kubelet registry socket on windows.T
UNHEALTHY
Means that the device is unhealthy.
VERSION
Means current version of the API supported by kubelet.