DeviceClassSpec
io.k8s.api.resource.v1beta1.DeviceClassSpec
source ↗
DeviceClassSpec is used in a [DeviceClass] to define what can be allocated and how to configure it.
config[]DeviceClassConfigurationConfig defines configuration parameters that apply to each device that is claimed via this class. Some classses may potentially be satisfied by multiple drivers, so each instance of a vendor configuration applies to exactly one driver.They are passed to the driver, but are not considered while allocating the claim.
opaqueOpaqueDeviceConfigurationOpaque provides driver-specific configuration parameters.
driverstring requiredDriver is used to determine which kubelet plugin needs to be passed these configuration parameters.An admission policy provided by the driver developer could use this to decide whether it needs to validate them.Must be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.parametersRawExtension requiredParameters can contain arbitrary data. It is the responsibility of the driver developer to handle validation and versioning. Typically this includes self-identification and a version ("kind" + "apiVersion" for Kubernetes types), with conversion between different versions.The length of the raw data must be smaller or equal to 10 Ki.extendedResourceNamestringExtendedResourceName is the extended resource name for the devices of this class. The devices of this class can be used to satisfy a pod's extended resource requests. It has the same format as the name of a pod's extended resource. It should be unique among all the device classes in a cluster. If two device classes have the same name, then the class created later is picked to satisfy a pod's extended resource requests. If two classes are created at the same time, then the name of the class lexicographically sorted first is picked.This is an alpha field.selectors[]DeviceSelectorEach selector must be satisfied by a device which is claimed via this class.
celCELDeviceSelectorCEL contains a CEL expression for selecting a device.
expressionstring requiredExpression is a CEL expression which evaluates a single device. It must evaluate to true when the device under consideration satisfies the desired criteria, and false when it does not. Any other result is an error and causes allocation of devices to abort.The expression's input is an object named "device", which carries the following properties:- driver (string): the name of the driver which defines this device.
- attributes (map[string]object): the device's attributes, grouped by prefix
- capacity (map[string]object): the device's capacities, grouped by prefix.
- allowMultipleAllocations (bool): the allowMultipleAllocations property of the device