Chapter 10. ResourceClaim [resource.k8s.io/v1]
- Description
ResourceClaim describes a request for access to resources in the cluster, for use by workloads. For example, if a workload needs an accelerator device with specific properties, this is how that request is expressed. The status stanza tracks whether this claim has been satisfied and what specific resources have been allocated.
This is an alpha type and requires enabling the DynamicResourceAllocation feature gate.
- Type
-
object - Required
-
spec
-
10.1. Specification Copy linkLink copied to clipboard!
| Property | Type | Description |
|---|---|---|
|
|
| APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources |
|
|
| Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds |
|
| Standard object metadata | |
|
|
| ResourceClaimSpec defines what is being requested in a ResourceClaim and how to configure it. |
|
|
| ResourceClaimStatus tracks whether the resource has been allocated and what the result of that was. |
10.1.1. .spec Copy linkLink copied to clipboard!
- Description
- ResourceClaimSpec defines what is being requested in a ResourceClaim and how to configure it.
- Type
-
object
| Property | Type | Description |
|---|---|---|
|
|
| DeviceClaim defines how to request devices with a ResourceClaim. |
10.1.2. .spec.devices Copy linkLink copied to clipboard!
- Description
- DeviceClaim defines how to request devices with a ResourceClaim.
- Type
-
object
| Property | Type | Description |
|---|---|---|
|
|
| This field holds configuration for multiple potential drivers which could satisfy requests in this claim. It is ignored while allocating the claim. |
|
|
| DeviceClaimConfiguration is used for configuration parameters in DeviceClaim. |
|
|
| These constraints must be satisfied by the set of devices that get allocated for the claim. |
|
|
| DeviceConstraint must have exactly one field set besides Requests. |
|
|
| Requests represent individual requests for distinct devices which must all be satisfied. If empty, nothing needs to be allocated. |
|
|
| DeviceRequest is a request for devices required for a claim. This is typically a request for a single resource like a device, but can also ask for several identical devices. With FirstAvailable it is also possible to provide a prioritized list of requests. |
10.1.3. .spec.devices.config Copy linkLink copied to clipboard!
- Description
- This field holds configuration for multiple potential drivers which could satisfy requests in this claim. It is ignored while allocating the claim.
- Type
-
array
10.1.4. .spec.devices.config[] Copy linkLink copied to clipboard!
- Description
- DeviceClaimConfiguration is used for configuration parameters in DeviceClaim.
- Type
-
object
| Property | Type | Description |
|---|---|---|
|
|
| OpaqueDeviceConfiguration contains configuration parameters for a driver in a format defined by the driver vendor. |
|
|
| Requests lists the names of requests where the configuration applies. If empty, it applies to all requests. References to subrequests must include the name of the main request and may include the subrequest using the format <main request>[/<subrequest>]. If just the main request is given, the configuration applies to all subrequests. |
10.1.5. .spec.devices.config[].opaque Copy linkLink copied to clipboard!
- Description
- OpaqueDeviceConfiguration contains configuration parameters for a driver in a format defined by the driver vendor.
- Type
-
object - Required
-
driver -
parameters
-
| Property | Type | Description |
|---|---|---|
|
|
| Driver 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. It should use only lower case characters. |
|
| Parameters 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. |
10.1.6. .spec.devices.constraints Copy linkLink copied to clipboard!
- Description
- These constraints must be satisfied by the set of devices that get allocated for the claim.
- Type
-
array
10.1.7. .spec.devices.constraints[] Copy linkLink copied to clipboard!
- Description
- DeviceConstraint must have exactly one field set besides Requests.
- Type
-
object
| Property | Type | Description |
|---|---|---|
|
|
| DistinctAttribute requires that all devices in question have this attribute and that its type and value are unique across those devices. This acts as the inverse of MatchAttribute. This constraint is used to avoid allocating multiple requests to the same device by ensuring attribute-level differentiation. This is useful for scenarios where resource requests must be fulfilled by separate physical devices. For example, a container requests two network interfaces that must be allocated from two different physical NICs. |
|
|
| MatchAttribute requires that all devices in question have this attribute and that its type and value are the same across those devices. For example, if you specified "dra.example.com/numa" (a hypothetical example!), then only devices in the same NUMA node will be chosen. A device which does not have that attribute will not be chosen. All devices should use a value of the same type for this attribute because that is part of its specification, but if one device doesn’t, then it also will not be chosen. Must include the domain qualifier. |
|
|
| Requests is a list of the one or more requests in this claim which must co-satisfy this constraint. If a request is fulfilled by multiple devices, then all of the devices must satisfy the constraint. If this is not specified, this constraint applies to all requests in this claim. References to subrequests must include the name of the main request and may include the subrequest using the format <main request>[/<subrequest>]. If just the main request is given, the constraint applies to all subrequests. |
10.1.8. .spec.devices.requests Copy linkLink copied to clipboard!
- Description
- Requests represent individual requests for distinct devices which must all be satisfied. If empty, nothing needs to be allocated.
- Type
-
array
10.1.9. .spec.devices.requests[] Copy linkLink copied to clipboard!
- Description
- DeviceRequest is a request for devices required for a claim. This is typically a request for a single resource like a device, but can also ask for several identical devices. With FirstAvailable it is also possible to provide a prioritized list of requests.
- Type
-
object - Required
-
name
-
| Property | Type | Description |
|---|---|---|
|
|
| ExactDeviceRequest is a request for one or more identical devices. |
|
|
| FirstAvailable contains subrequests, of which exactly one will be selected by the scheduler. It tries to satisfy them in the order in which they are listed here. So if there are two entries in the list, the scheduler will only check the second one if it determines that the first one can not be used. DRA does not yet implement scoring, so the scheduler will select the first set of devices that satisfies all the requests in the claim. And if the requirements can be satisfied on more than one node, other scheduling features will determine which node is chosen. This means that the set of devices allocated to a claim might not be the optimal set available to the cluster. Scoring will be implemented later. |
|
|
| DeviceSubRequest describes a request for device provided in the claim.spec.devices.requests[].firstAvailable array. Each is typically a request for a single resource like a device, but can also ask for several identical devices. DeviceSubRequest is similar to ExactDeviceRequest, but doesn’t expose the AdminAccess field as that one is only supported when requesting a specific device. |
|
|
| Name can be used to reference this request in a pod.spec.containers[].resources.claims entry and in a constraint of the claim. References using the name in the DeviceRequest will uniquely identify a request when the Exactly field is set. When the FirstAvailable field is set, a reference to the name of the DeviceRequest will match whatever subrequest is chosen by the scheduler. Must be a DNS label. |
10.1.10. .spec.devices.requests[].exactly Copy linkLink copied to clipboard!
- Description
- ExactDeviceRequest is a request for one or more identical devices.
- Type
-
object - Required
-
deviceClassName
-
| Property | Type | Description |
|---|---|---|
|
|
| AdminAccess indicates that this is a claim for administrative access to the device(s). Claims with AdminAccess are expected to be used for monitoring or other management services for a device. They ignore all ordinary claims to the device with respect to access modes and any resource allocations. This is an alpha field and requires enabling the DRAAdminAccess feature gate. Admin access is disabled if this field is unset or set to false, otherwise it is enabled. |
|
|
| AllocationMode and its related fields define how devices are allocated to satisfy this request. Supported values are: - ExactCount: This request is for a specific number of devices. This is the default. The exact number is provided in the count field. - All: This request is for all of the matching devices in a pool. At least one device must exist on the node for the allocation to succeed. Allocation will fail if some devices are already allocated, unless adminAccess is requested. If AllocationMode is not specified, the default mode is ExactCount. If the mode is ExactCount and count is not specified, the default count is one. Any other requests must specify this field. More modes may get added in the future. Clients must refuse to handle requests with unknown modes.
Possible enum values: - |
|
|
| CapacityRequirements defines the capacity requirements for a specific device request. |
|
|
| Count is used only when the count mode is "ExactCount". Must be greater than zero. If AllocationMode is ExactCount and this field is not specified, the default is one. |
|
|
| DeviceClassName references a specific DeviceClass, which can define additional configuration and selectors to be inherited by this request. A DeviceClassName is required. Administrators may use this to restrict which devices may get requested by only installing classes with selectors for permitted devices. If users are free to request anything without restrictions, then administrators can create an empty DeviceClass for users to reference. |
|
|
| Selectors define criteria which must be satisfied by a specific device in order for that device to be considered for this request. All selectors must be satisfied for a device to be considered. |
|
|
| DeviceSelector must have exactly one field set. |
|
|
| If specified, the request’s tolerations. Tolerations for NoSchedule are required to allocate a device which has a taint with that effect. The same applies to NoExecute. In addition, should any of the allocated devices get tainted with NoExecute after allocation and that effect is not tolerated, then all pods consuming the ResourceClaim get deleted to evict them. The scheduler will not let new pods reserve the claim while it has these tainted devices. Once all pods are evicted, the claim will get deallocated. The maximum number of tolerations is 16. This is an alpha field and requires enabling the DRADeviceTaints feature gate. |
|
|
| The ResourceClaim this DeviceToleration is attached to tolerates any taint that matches the triple <key,value,effect> using the matching operator <operator>. |
10.1.11. .spec.devices.requests[].exactly.capacity Copy linkLink copied to clipboard!
- Description
- CapacityRequirements defines the capacity requirements for a specific device request.
- Type
-
object
| Property | Type | Description |
|---|---|---|
|
| Requests represent individual device resource requests for distinct resources, all of which must be provided by the device.
This value is used as an additional filtering condition against the available capacity on the device. This is semantically equivalent to a CEL selector with When a requestPolicy is defined, the requested amount is adjusted upward to the nearest valid value based on the policy. If the requested amount cannot be adjusted to a valid value—because it exceeds what the requestPolicy allows— the device is considered ineligible for allocation. For any capacity that is not explicitly requested: - If no requestPolicy is set, the default consumed capacity is equal to the full device capacity (i.e., the whole device is claimed). - If a requestPolicy is set, the default consumed capacity is determined according to that policy. If the device allows multiple allocation, the aggregated amount across all requests must not exceed the capacity value. The consumed capacity, which may be adjusted based on the requestPolicy if defined, is recorded in the resource claim’s status.devices[*].consumedCapacity field. |
10.1.12. .spec.devices.requests[].exactly.selectors Copy linkLink copied to clipboard!
- Description
- Selectors define criteria which must be satisfied by a specific device in order for that device to be considered for this request. All selectors must be satisfied for a device to be considered.
- Type
-
array
10.1.13. .spec.devices.requests[].exactly.selectors[] Copy linkLink copied to clipboard!
- Description
- DeviceSelector must have exactly one field set.
- Type
-
object
| Property | Type | Description |
|---|---|---|
|
|
| CELDeviceSelector contains a CEL expression for selecting a device. |
10.1.14. .spec.devices.requests[].exactly.selectors[].cel Copy linkLink copied to clipboard!
- Description
- CELDeviceSelector contains a CEL expression for selecting a device.
- Type
-
object - Required
-
expression
-
| Property | Type | Description |
|---|---|---|
|
|
| Expression 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 (e.g. device.attributes["dra.example.com"] evaluates to an object with all of the attributes which were prefixed by "dra.example.com". - capacity (map[string]object): the device’s capacities, grouped by prefix. - allowMultipleAllocations (bool): the allowMultipleAllocations property of the device (v1.34+ with the DRAConsumableCapacity feature enabled). Example: Consider a device with driver="dra.example.com", which exposes two attributes named "model" and "ext.example.com/family" and which exposes one capacity named "modules". This input to this expression would have the following fields: device.driver device.attributes["dra.example.com"].model device.attributes["ext.example.com"].family device.capacity["dra.example.com"].modules The device.driver field can be used to check for a specific driver, either as a high-level precondition (i.e. you only want to consider devices from this driver) or as part of a multi-clause expression that is meant to consider devices from different drivers. The value type of each attribute is defined by the device definition, and users who write these expressions must consult the documentation for their specific drivers. The value type of each capacity is Quantity. If an unknown prefix is used as a lookup in either device.attributes or device.capacity, an empty map will be returned. Any reference to an unknown field will cause an evaluation error and allocation to abort. A robust expression should check for the existence of attributes before referencing them. For ease of use, the cel.bind() function is enabled, and can be used to simplify expressions that access multiple attributes with the same domain. For example: cel.bind(dra, device.attributes["dra.example.com"], dra.someBool && dra.anotherBool) The length of the expression must be smaller or equal to 10 Ki. The cost of evaluating it is also limited based on the estimated number of logical steps. |
10.1.15. .spec.devices.requests[].exactly.tolerations Copy linkLink copied to clipboard!
- Description
If specified, the request’s tolerations.
Tolerations for NoSchedule are required to allocate a device which has a taint with that effect. The same applies to NoExecute.
In addition, should any of the allocated devices get tainted with NoExecute after allocation and that effect is not tolerated, then all pods consuming the ResourceClaim get deleted to evict them. The scheduler will not let new pods reserve the claim while it has these tainted devices. Once all pods are evicted, the claim will get deallocated.
The maximum number of tolerations is 16.
This is an alpha field and requires enabling the DRADeviceTaints feature gate.
- Type
-
array
10.1.16. .spec.devices.requests[].exactly.tolerations[] Copy linkLink copied to clipboard!
- Description
- The ResourceClaim this DeviceToleration is attached to tolerates any taint that matches the triple <key,value,effect> using the matching operator <operator>.
- Type
-
object
| Property | Type | Description |
|---|---|---|
|
|
| Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule and NoExecute.
Possible enum values: - |
|
|
| Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. Must be a label name. |
|
|
| Operator represents a key’s relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a ResourceClaim can tolerate all taints of a particular category.
Possible enum values: - |
|
|
| TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. If larger than zero, the time when the pod needs to be evicted is calculated as <time when taint was adedd> + <toleration seconds>. |
|
|
| Value is the taint value the toleration matches to. If the operator is Exists, the value must be empty, otherwise just a regular string. Must be a label value. |
10.1.17. .spec.devices.requests[].firstAvailable Copy linkLink copied to clipboard!
- Description
FirstAvailable contains subrequests, of which exactly one will be selected by the scheduler. It tries to satisfy them in the order in which they are listed here. So if there are two entries in the list, the scheduler will only check the second one if it determines that the first one can not be used.
DRA does not yet implement scoring, so the scheduler will select the first set of devices that satisfies all the requests in the claim. And if the requirements can be satisfied on more than one node, other scheduling features will determine which node is chosen. This means that the set of devices allocated to a claim might not be the optimal set available to the cluster. Scoring will be implemented later.
- Type
-
array
10.1.18. .spec.devices.requests[].firstAvailable[] Copy linkLink copied to clipboard!
- Description
DeviceSubRequest describes a request for device provided in the claim.spec.devices.requests[].firstAvailable array. Each is typically a request for a single resource like a device, but can also ask for several identical devices.
DeviceSubRequest is similar to ExactDeviceRequest, but doesn’t expose the AdminAccess field as that one is only supported when requesting a specific device.
- Type
-
object - Required
-
name -
deviceClassName
-
| Property | Type | Description |
|---|---|---|
|
|
| AllocationMode and its related fields define how devices are allocated to satisfy this subrequest. Supported values are: - ExactCount: This request is for a specific number of devices. This is the default. The exact number is provided in the count field. - All: This subrequest is for all of the matching devices in a pool. Allocation will fail if some devices are already allocated, unless adminAccess is requested. If AllocationMode is not specified, the default mode is ExactCount. If the mode is ExactCount and count is not specified, the default count is one. Any other subrequests must specify this field. More modes may get added in the future. Clients must refuse to handle requests with unknown modes.
Possible enum values: - |
|
|
| CapacityRequirements defines the capacity requirements for a specific device request. |
|
|
| Count is used only when the count mode is "ExactCount". Must be greater than zero. If AllocationMode is ExactCount and this field is not specified, the default is one. |
|
|
| DeviceClassName references a specific DeviceClass, which can define additional configuration and selectors to be inherited by this subrequest. A class is required. Which classes are available depends on the cluster. Administrators may use this to restrict which devices may get requested by only installing classes with selectors for permitted devices. If users are free to request anything without restrictions, then administrators can create an empty DeviceClass for users to reference. |
|
|
| Name can be used to reference this subrequest in the list of constraints or the list of configurations for the claim. References must use the format <main request>/<subrequest>. Must be a DNS label. |
|
|
| Selectors define criteria which must be satisfied by a specific device in order for that device to be considered for this subrequest. All selectors must be satisfied for a device to be considered. |
|
|
| DeviceSelector must have exactly one field set. |
|
|
| If specified, the request’s tolerations. Tolerations for NoSchedule are required to allocate a device which has a taint with that effect. The same applies to NoExecute. In addition, should any of the allocated devices get tainted with NoExecute after allocation and that effect is not tolerated, then all pods consuming the ResourceClaim get deleted to evict them. The scheduler will not let new pods reserve the claim while it has these tainted devices. Once all pods are evicted, the claim will get deallocated. The maximum number of tolerations is 16. This is an alpha field and requires enabling the DRADeviceTaints feature gate. |
|
|
| The ResourceClaim this DeviceToleration is attached to tolerates any taint that matches the triple <key,value,effect> using the matching operator <operator>. |
10.1.19. .spec.devices.requests[].firstAvailable[].capacity Copy linkLink copied to clipboard!
- Description
- CapacityRequirements defines the capacity requirements for a specific device request.
- Type
-
object
| Property | Type | Description |
|---|---|---|
|
| Requests represent individual device resource requests for distinct resources, all of which must be provided by the device.
This value is used as an additional filtering condition against the available capacity on the device. This is semantically equivalent to a CEL selector with When a requestPolicy is defined, the requested amount is adjusted upward to the nearest valid value based on the policy. If the requested amount cannot be adjusted to a valid value—because it exceeds what the requestPolicy allows— the device is considered ineligible for allocation. For any capacity that is not explicitly requested: - If no requestPolicy is set, the default consumed capacity is equal to the full device capacity (i.e., the whole device is claimed). - If a requestPolicy is set, the default consumed capacity is determined according to that policy. If the device allows multiple allocation, the aggregated amount across all requests must not exceed the capacity value. The consumed capacity, which may be adjusted based on the requestPolicy if defined, is recorded in the resource claim’s status.devices[*].consumedCapacity field. |
10.1.20. .spec.devices.requests[].firstAvailable[].selectors Copy linkLink copied to clipboard!
- Description
- Selectors define criteria which must be satisfied by a specific device in order for that device to be considered for this subrequest. All selectors must be satisfied for a device to be considered.
- Type
-
array
10.1.21. .spec.devices.requests[].firstAvailable[].selectors[] Copy linkLink copied to clipboard!
- Description
- DeviceSelector must have exactly one field set.
- Type
-
object
| Property | Type | Description |
|---|---|---|
|
|
| CELDeviceSelector contains a CEL expression for selecting a device. |
10.1.22. .spec.devices.requests[].firstAvailable[].selectors[].cel Copy linkLink copied to clipboard!
- Description
- CELDeviceSelector contains a CEL expression for selecting a device.
- Type
-
object - Required
-
expression
-
| Property | Type | Description |
|---|---|---|
|
|
| Expression 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 (e.g. device.attributes["dra.example.com"] evaluates to an object with all of the attributes which were prefixed by "dra.example.com". - capacity (map[string]object): the device’s capacities, grouped by prefix. - allowMultipleAllocations (bool): the allowMultipleAllocations property of the device (v1.34+ with the DRAConsumableCapacity feature enabled). Example: Consider a device with driver="dra.example.com", which exposes two attributes named "model" and "ext.example.com/family" and which exposes one capacity named "modules". This input to this expression would have the following fields: device.driver device.attributes["dra.example.com"].model device.attributes["ext.example.com"].family device.capacity["dra.example.com"].modules The device.driver field can be used to check for a specific driver, either as a high-level precondition (i.e. you only want to consider devices from this driver) or as part of a multi-clause expression that is meant to consider devices from different drivers. The value type of each attribute is defined by the device definition, and users who write these expressions must consult the documentation for their specific drivers. The value type of each capacity is Quantity. If an unknown prefix is used as a lookup in either device.attributes or device.capacity, an empty map will be returned. Any reference to an unknown field will cause an evaluation error and allocation to abort. A robust expression should check for the existence of attributes before referencing them. For ease of use, the cel.bind() function is enabled, and can be used to simplify expressions that access multiple attributes with the same domain. For example: cel.bind(dra, device.attributes["dra.example.com"], dra.someBool && dra.anotherBool) The length of the expression must be smaller or equal to 10 Ki. The cost of evaluating it is also limited based on the estimated number of logical steps. |
10.1.23. .spec.devices.requests[].firstAvailable[].tolerations Copy linkLink copied to clipboard!
- Description
If specified, the request’s tolerations.
Tolerations for NoSchedule are required to allocate a device which has a taint with that effect. The same applies to NoExecute.
In addition, should any of the allocated devices get tainted with NoExecute after allocation and that effect is not tolerated, then all pods consuming the ResourceClaim get deleted to evict them. The scheduler will not let new pods reserve the claim while it has these tainted devices. Once all pods are evicted, the claim will get deallocated.
The maximum number of tolerations is 16.
This is an alpha field and requires enabling the DRADeviceTaints feature gate.
- Type
-
array
10.1.24. .spec.devices.requests[].firstAvailable[].tolerations[] Copy linkLink copied to clipboard!
- Description
- The ResourceClaim this DeviceToleration is attached to tolerates any taint that matches the triple <key,value,effect> using the matching operator <operator>.
- Type
-
object
| Property | Type | Description |
|---|---|---|
|
|
| Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule and NoExecute.
Possible enum values: - |
|
|
| Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. Must be a label name. |
|
|
| Operator represents a key’s relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a ResourceClaim can tolerate all taints of a particular category.
Possible enum values: - |
|
|
| TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. If larger than zero, the time when the pod needs to be evicted is calculated as <time when taint was adedd> + <toleration seconds>. |
|
|
| Value is the taint value the toleration matches to. If the operator is Exists, the value must be empty, otherwise just a regular string. Must be a label value. |
10.1.25. .status Copy linkLink copied to clipboard!
- Description
- ResourceClaimStatus tracks whether the resource has been allocated and what the result of that was.
- Type
-
object
| Property | Type | Description |
|---|---|---|
|
|
| AllocationResult contains attributes of an allocated resource. |
|
|
| Devices contains the status of each device allocated for this claim, as reported by the driver. This can include driver-specific information. Entries are owned by their respective drivers. |
|
|
| AllocatedDeviceStatus contains the status of an allocated device, if the driver chooses to report it. This may include driver-specific information. The combination of Driver, Pool, Device, and ShareID must match the corresponding key in Status.Allocation.Devices. |
|
|
| ReservedFor indicates which entities are currently allowed to use the claim. A Pod which references a ResourceClaim which is not reserved for that Pod will not be started. A claim that is in use or might be in use because it has been reserved must not get deallocated. In a cluster with multiple scheduler instances, two pods might get scheduled concurrently by different schedulers. When they reference the same ResourceClaim which already has reached its maximum number of consumers, only one pod can be scheduled. Both schedulers try to add their pod to the claim.status.reservedFor field, but only the update that reaches the API server first gets stored. The other one fails with an error and the scheduler which issued it knows that it must put the pod back into the queue, waiting for the ResourceClaim to become usable again. There can be at most 256 such reservations. This may get increased in the future, but not reduced. |
|
|
| ResourceClaimConsumerReference contains enough information to let you locate the consumer of a ResourceClaim. The user must be a resource in the same namespace as the ResourceClaim. |
10.1.26. .status.allocation Copy linkLink copied to clipboard!
- Description
- AllocationResult contains attributes of an allocated resource.
- Type
-
object
| Property | Type | Description |
|---|---|---|
|
| AllocationTimestamp stores the time when the resources were allocated. This field is not guaranteed to be set, in which case that time is unknown. This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gate. | |
|
|
| DeviceAllocationResult is the result of allocating devices. |
|
| NodeSelector defines where the allocated resources are available. If unset, they are available everywhere. |
10.1.27. .status.allocation.devices Copy linkLink copied to clipboard!
- Description
- DeviceAllocationResult is the result of allocating devices.
- Type
-
object
| Property | Type | Description |
|---|---|---|
|
|
| This field is a combination of all the claim and class configuration parameters. Drivers can distinguish between those based on a flag. This includes configuration parameters for drivers which have no allocated devices in the result because it is up to the drivers which configuration parameters they support. They can silently ignore unknown configuration parameters. |
|
|
| DeviceAllocationConfiguration gets embedded in an AllocationResult. |
|
|
| Results lists all allocated devices. |
|
|
| DeviceRequestAllocationResult contains the allocation result for one request. |
10.1.28. .status.allocation.devices.config Copy linkLink copied to clipboard!
- Description
This field is a combination of all the claim and class configuration parameters. Drivers can distinguish between those based on a flag.
This includes configuration parameters for drivers which have no allocated devices in the result because it is up to the drivers which configuration parameters they support. They can silently ignore unknown configuration parameters.
- Type
-
array
10.1.29. .status.allocation.devices.config[] Copy linkLink copied to clipboard!
- Description
- DeviceAllocationConfiguration gets embedded in an AllocationResult.
- Type
-
object - Required
-
source
-
| Property | Type | Description |
|---|---|---|
|
|
| OpaqueDeviceConfiguration contains configuration parameters for a driver in a format defined by the driver vendor. |
|
|
| Requests lists the names of requests where the configuration applies. If empty, its applies to all requests. References to subrequests must include the name of the main request and may include the subrequest using the format <main request>[/<subrequest>]. If just the main request is given, the configuration applies to all subrequests. |
|
|
| Source records whether the configuration comes from a class and thus is not something that a normal user would have been able to set or from a claim.
Possible enum values: - |
10.1.30. .status.allocation.devices.config[].opaque Copy linkLink copied to clipboard!
- Description
- OpaqueDeviceConfiguration contains configuration parameters for a driver in a format defined by the driver vendor.
- Type
-
object - Required
-
driver -
parameters
-
| Property | Type | Description |
|---|---|---|
|
|
| Driver 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. It should use only lower case characters. |
|
| Parameters 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. |
10.1.31. .status.allocation.devices.results Copy linkLink copied to clipboard!
- Description
- Results lists all allocated devices.
- Type
-
array
10.1.32. .status.allocation.devices.results[] Copy linkLink copied to clipboard!
- Description
- DeviceRequestAllocationResult contains the allocation result for one request.
- Type
-
object - Required
-
request -
driver -
pool -
device
-
| Property | Type | Description |
|---|---|---|
|
|
| AdminAccess indicates that this device was allocated for administrative access. See the corresponding request field for a definition of mode. This is an alpha field and requires enabling the DRAAdminAccess feature gate. Admin access is disabled if this field is unset or set to false, otherwise it is enabled. |
|
|
| BindingConditions contains a copy of the BindingConditions from the corresponding ResourceSlice at the time of allocation. This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gates. |
|
|
| BindingFailureConditions contains a copy of the BindingFailureConditions from the corresponding ResourceSlice at the time of allocation. This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gates. |
|
| ConsumedCapacity tracks the amount of capacity consumed per device as part of the claim request. The consumed amount may differ from the requested amount: it is rounded up to the nearest valid value based on the device’s requestPolicy if applicable (i.e., may not be less than the requested amount). The total consumed capacity for each device must not exceed the DeviceCapacity’s Value. This field is populated only for devices that allow multiple allocations. All capacity entries are included, even if the consumed amount is zero. | |
|
|
| Device references one device instance via its name in the driver’s resource pool. It must be a DNS label. |
|
|
| Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node. Must be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. It should use only lower case characters. |
|
|
|
This name together with the driver name and the device name field identify which device was allocated ( Must not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes. |
|
|
| Request is the name of the request in the claim which caused this device to be allocated. If it references a subrequest in the firstAvailable list on a DeviceRequest, this field must include both the name of the main request and the subrequest using the format <main request>/<subrequest>. Multiple devices may have been allocated per request. |
|
|
| ShareID uniquely identifies an individual allocation share of the device, used when the device supports multiple simultaneous allocations. It serves as an additional map key to differentiate concurrent shares of the same device. |
|
|
| A copy of all tolerations specified in the request at the time when the device got allocated. The maximum number of tolerations is 16. This is an alpha field and requires enabling the DRADeviceTaints feature gate. |
|
|
| The ResourceClaim this DeviceToleration is attached to tolerates any taint that matches the triple <key,value,effect> using the matching operator <operator>. |
10.1.33. .status.allocation.devices.results[].tolerations Copy linkLink copied to clipboard!
- Description
A copy of all tolerations specified in the request at the time when the device got allocated.
The maximum number of tolerations is 16.
This is an alpha field and requires enabling the DRADeviceTaints feature gate.
- Type
-
array
10.1.34. .status.allocation.devices.results[].tolerations[] Copy linkLink copied to clipboard!
- Description
- The ResourceClaim this DeviceToleration is attached to tolerates any taint that matches the triple <key,value,effect> using the matching operator <operator>.
- Type
-
object
| Property | Type | Description |
|---|---|---|
|
|
| Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule and NoExecute.
Possible enum values: - |
|
|
| Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. Must be a label name. |
|
|
| Operator represents a key’s relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a ResourceClaim can tolerate all taints of a particular category.
Possible enum values: - |
|
|
| TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. If larger than zero, the time when the pod needs to be evicted is calculated as <time when taint was adedd> + <toleration seconds>. |
|
|
| Value is the taint value the toleration matches to. If the operator is Exists, the value must be empty, otherwise just a regular string. Must be a label value. |
10.1.35. .status.devices Copy linkLink copied to clipboard!
- Description
- Devices contains the status of each device allocated for this claim, as reported by the driver. This can include driver-specific information. Entries are owned by their respective drivers.
- Type
-
array
10.1.36. .status.devices[] Copy linkLink copied to clipboard!
- Description
AllocatedDeviceStatus contains the status of an allocated device, if the driver chooses to report it. This may include driver-specific information.
The combination of Driver, Pool, Device, and ShareID must match the corresponding key in Status.Allocation.Devices.
- Type
-
object - Required
-
driver -
pool -
device
-
| Property | Type | Description |
|---|---|---|
|
|
Conditions contains the latest observation of the device’s state. If the device has been configured according to the class and claim config references, the Must not contain more than 8 entries. | |
|
| Data contains arbitrary driver-specific data. The length of the raw data must be smaller or equal to 10 Ki. | |
|
|
| Device references one device instance via its name in the driver’s resource pool. It must be a DNS label. |
|
|
| Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node. Must be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. It should use only lower case characters. |
|
|
| NetworkDeviceData provides network-related details for the allocated device. This information may be filled by drivers or other components to configure or identify the device within a network context. |
|
|
|
This name together with the driver name and the device name field identify which device was allocated ( Must not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes. |
|
|
| ShareID uniquely identifies an individual allocation share of the device. |
10.1.37. .status.devices[].networkData Copy linkLink copied to clipboard!
- Description
- NetworkDeviceData provides network-related details for the allocated device. This information may be filled by drivers or other components to configure or identify the device within a network context.
- Type
-
object
| Property | Type | Description |
|---|---|---|
|
|
| HardwareAddress represents the hardware address (e.g. MAC Address) of the device’s network interface. Must not be longer than 128 characters. |
|
|
| InterfaceName specifies the name of the network interface associated with the allocated device. This might be the name of a physical or virtual network interface being configured in the pod. Must not be longer than 256 characters. |
|
|
| IPs lists the network addresses assigned to the device’s network interface. This can include both IPv4 and IPv6 addresses. The IPs are in the CIDR notation, which includes both the address and the associated subnet mask. e.g.: "192.0.2.5/24" for IPv4 and "2001:db8::5/64" for IPv6. |
10.1.38. .status.reservedFor Copy linkLink copied to clipboard!
- Description
ReservedFor indicates which entities are currently allowed to use the claim. A Pod which references a ResourceClaim which is not reserved for that Pod will not be started. A claim that is in use or might be in use because it has been reserved must not get deallocated.
In a cluster with multiple scheduler instances, two pods might get scheduled concurrently by different schedulers. When they reference the same ResourceClaim which already has reached its maximum number of consumers, only one pod can be scheduled.
Both schedulers try to add their pod to the claim.status.reservedFor field, but only the update that reaches the API server first gets stored. The other one fails with an error and the scheduler which issued it knows that it must put the pod back into the queue, waiting for the ResourceClaim to become usable again.
There can be at most 256 such reservations. This may get increased in the future, but not reduced.
- Type
-
array
10.1.39. .status.reservedFor[] Copy linkLink copied to clipboard!
- Description
- ResourceClaimConsumerReference contains enough information to let you locate the consumer of a ResourceClaim. The user must be a resource in the same namespace as the ResourceClaim.
- Type
-
object - Required
-
resource -
name -
uid
-
| Property | Type | Description |
|---|---|---|
|
|
| APIGroup is the group for the resource being referenced. It is empty for the core API. This matches the group in the APIVersion that is used when creating the resources. |
|
|
| Name is the name of resource being referenced. |
|
|
| Resource is the type of resource being referenced, for example "pods". |
|
|
| UID identifies exactly one incarnation of the resource. |
10.2. API endpoints Copy linkLink copied to clipboard!
The following API endpoints are available:
/apis/resource.k8s.io/v1/resourceclaims-
GET: list or watch objects of kind ResourceClaim
-
/apis/resource.k8s.io/v1/watch/resourceclaims-
GET: watch individual changes to a list of ResourceClaim. deprecated: use the 'watch' parameter with a list operation instead.
-
/apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaims-
DELETE: delete collection of ResourceClaim -
GET: list or watch objects of kind ResourceClaim -
POST: create a ResourceClaim
-
/apis/resource.k8s.io/v1/watch/namespaces/{namespace}/resourceclaims-
GET: watch individual changes to a list of ResourceClaim. deprecated: use the 'watch' parameter with a list operation instead.
-
/apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaims/{name}-
DELETE: delete a ResourceClaim -
GET: read the specified ResourceClaim -
PATCH: partially update the specified ResourceClaim -
PUT: replace the specified ResourceClaim
-
/apis/resource.k8s.io/v1/watch/namespaces/{namespace}/resourceclaims/{name}-
GET: watch changes to an object of kind ResourceClaim. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.
-
/apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaims/{name}/status-
GET: read status of the specified ResourceClaim -
PATCH: partially update status of the specified ResourceClaim -
PUT: replace status of the specified ResourceClaim
-
10.2.1. /apis/resource.k8s.io/v1/resourceclaims Copy linkLink copied to clipboard!
- HTTP method
-
GET - Description
- list or watch objects of kind ResourceClaim
| HTTP code | Reponse body |
|---|---|
| 200 - OK |
|
| 401 - Unauthorized | Empty |
10.2.2. /apis/resource.k8s.io/v1/watch/resourceclaims Copy linkLink copied to clipboard!
- HTTP method
-
GET - Description
- watch individual changes to a list of ResourceClaim. deprecated: use the 'watch' parameter with a list operation instead.
| HTTP code | Reponse body |
|---|---|
| 200 - OK |
|
| 401 - Unauthorized | Empty |
10.2.3. /apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaims Copy linkLink copied to clipboard!
- HTTP method
-
DELETE - Description
- delete collection of ResourceClaim
| Parameter | Type | Description |
|---|---|---|
|
|
| When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed |
| HTTP code | Reponse body |
|---|---|
| 200 - OK |
|
| 401 - Unauthorized | Empty |
- HTTP method
-
GET - Description
- list or watch objects of kind ResourceClaim
| HTTP code | Reponse body |
|---|---|
| 200 - OK |
|
| 401 - Unauthorized | Empty |
- HTTP method
-
POST - Description
- create a ResourceClaim
| Parameter | Type | Description |
|---|---|---|
|
|
| When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed |
|
|
| fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. |
| Parameter | Type | Description |
|---|---|---|
|
|
|
| HTTP code | Reponse body |
|---|---|
| 200 - OK |
|
| 201 - Created |
|
| 202 - Accepted |
|
| 401 - Unauthorized | Empty |
10.2.4. /apis/resource.k8s.io/v1/watch/namespaces/{namespace}/resourceclaims Copy linkLink copied to clipboard!
- HTTP method
-
GET - Description
- watch individual changes to a list of ResourceClaim. deprecated: use the 'watch' parameter with a list operation instead.
| HTTP code | Reponse body |
|---|---|
| 200 - OK |
|
| 401 - Unauthorized | Empty |
10.2.5. /apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaims/{name} Copy linkLink copied to clipboard!
| Parameter | Type | Description |
|---|---|---|
|
|
| name of the ResourceClaim |
- HTTP method
-
DELETE - Description
- delete a ResourceClaim
| Parameter | Type | Description |
|---|---|---|
|
|
| When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed |
| HTTP code | Reponse body |
|---|---|
| 200 - OK |
|
| 202 - Accepted |
|
| 401 - Unauthorized | Empty |
- HTTP method
-
GET - Description
- read the specified ResourceClaim
| HTTP code | Reponse body |
|---|---|
| 200 - OK |
|
| 401 - Unauthorized | Empty |
- HTTP method
-
PATCH - Description
- partially update the specified ResourceClaim
| Parameter | Type | Description |
|---|---|---|
|
|
| When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed |
|
|
| fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. |
| HTTP code | Reponse body |
|---|---|
| 200 - OK |
|
| 201 - Created |
|
| 401 - Unauthorized | Empty |
- HTTP method
-
PUT - Description
- replace the specified ResourceClaim
| Parameter | Type | Description |
|---|---|---|
|
|
| When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed |
|
|
| fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. |
| Parameter | Type | Description |
|---|---|---|
|
|
|
| HTTP code | Reponse body |
|---|---|
| 200 - OK |
|
| 201 - Created |
|
| 401 - Unauthorized | Empty |
10.2.6. /apis/resource.k8s.io/v1/watch/namespaces/{namespace}/resourceclaims/{name} Copy linkLink copied to clipboard!
| Parameter | Type | Description |
|---|---|---|
|
|
| name of the ResourceClaim |
- HTTP method
-
GET - Description
- watch changes to an object of kind ResourceClaim. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.
| HTTP code | Reponse body |
|---|---|
| 200 - OK |
|
| 401 - Unauthorized | Empty |
10.2.7. /apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaims/{name}/status Copy linkLink copied to clipboard!
| Parameter | Type | Description |
|---|---|---|
|
|
| name of the ResourceClaim |
- HTTP method
-
GET - Description
- read status of the specified ResourceClaim
| HTTP code | Reponse body |
|---|---|
| 200 - OK |
|
| 401 - Unauthorized | Empty |
- HTTP method
-
PATCH - Description
- partially update status of the specified ResourceClaim
| Parameter | Type | Description |
|---|---|---|
|
|
| When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed |
|
|
| fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. |
| HTTP code | Reponse body |
|---|---|
| 200 - OK |
|
| 201 - Created |
|
| 401 - Unauthorized | Empty |
- HTTP method
-
PUT - Description
- replace status of the specified ResourceClaim
| Parameter | Type | Description |
|---|---|---|
|
|
| When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed |
|
|
| fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. |
| Parameter | Type | Description |
|---|---|---|
|
|
|
| HTTP code | Reponse body |
|---|---|
| 200 - OK |
|
| 201 - Created |
|
| 401 - Unauthorized | Empty |