ResourceSliceSpec
io.k8s.api.resource.v1.ResourceSliceSpec
source ↗
ResourceSliceSpec contains the information published by the driver in one ResourceSlice.
allNodesbooleanAllNodes indicates that all nodes have access to the resources in the pool.Exactly one of NodeName, NodeSelector, AllNodes, and PerDeviceNodeSelection must be set.devices[]DeviceDevices lists some or all of the devices in this pool.Must not have more than 128 entries.
allNodesbooleanAllNodes indicates that all nodes have access to the device.Must only be set if Spec.PerDeviceNodeSelection is set to true. At most one of NodeName, NodeSelector and AllNodes can be set.allowMultipleAllocationsbooleanAllowMultipleAllocations marks whether the device is allowed to be allocated to multiple DeviceRequests.If AllowMultipleAllocations is set to true, the device can be allocated more than once, and all of its capacity is consumable, regardless of whether the requestPolicy is defined or not.attributesmap[string]DeviceAttributeAttributes defines the set of attributes for this device. The name of each attribute must be unique in that set.The maximum number of attributes and capacities combined is 32.
boolbooleanBoolValue is a true/false value.intinteger (int64)IntValue is a number.stringstringStringValue is a string. Must not be longer than 64 characters.versionstringVersionValue is a semantic version according to semver.org spec 2.0.0. Must not be longer than 64 characters.bindingConditions[]stringBindingConditions defines the conditions for proceeding with binding. All of these conditions must be set in the per-device status conditions with a value of True to proceed with binding the pod to the node while scheduling the pod.The maximum number of binding conditions is 4.The conditions must be a valid condition type string.This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gates.bindingFailureConditions[]stringBindingFailureConditions defines the conditions for binding failure. They may be set in the per-device status conditions. If any is set to "True", a binding failure occurred.The maximum number of binding failure conditions is 4.The conditions must be a valid condition type string.This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gates.bindsToNodebooleanBindsToNode indicates if the usage of an allocation involving this device has to be limited to exactly the node that was chosen when allocating the claim. If set to true, the scheduler will set the ResourceClaim.Status.Allocation.NodeSelector to match the node where the allocation was made.This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gates.capacitymap[string]DeviceCapacityCapacity defines the set of capacities for this device. The name of each capacity must be unique in that set.The maximum number of attributes and capacities combined is 32.
requestPolicyCapacityRequestPolicyRequestPolicy defines how this DeviceCapacity must be consumed when the device is allowed to be shared by multiple allocations.The Device must have allowMultipleAllocations set to true in order to set a requestPolicy.If unset, capacity requests are unconstrained: requests can consume any amount of capacity, as long as the total consumed across all allocations does not exceed the device's defined capacity. If request is also unset, default is the full capacity value.
defaultQuantityDefault specifies how much of this capacity is consumed by a request that does not contain an entry for it in DeviceRequest's Capacity.validRangeCapacityRequestPolicyRangeValidRange defines an acceptable quantity value range in consuming requests.If this field is set, Default must be defined and it must fall within the defined ValidRange.If the requested amount does not fall within the defined range, the request violates the policy, and this device cannot be allocated.If the request doesn't contain this capacity entry, Default value is used.
maxQuantityMax defines the upper limit for capacity that can be requested.Max must be less than or equal to the capacity value. Min and requestPolicy.default must be less than or equal to the maximum.minQuantity requiredMin specifies the minimum capacity allowed for a consumption request.Min must be greater than or equal to zero, and less than or equal to the capacity value. requestPolicy.default must be more than or equal to the minimum.stepQuantityStep defines the step size between valid capacity amounts within the range.Max (if set) and requestPolicy.default must be a multiple of Step. Min + Step must be less than or equal to the capacity value.validValues[]QuantityValidValues defines a set of acceptable quantity values in consuming requests.Must not contain more than 10 entries. Must be sorted in ascending order.If this field is set, Default must be defined and it must be included in ValidValues list.If the requested amount does not match any valid value but smaller than some valid values, the scheduler calculates the smallest valid value that is greater than or equal to the request. That is: min(ceil(requestedValue) ∈ validValues), where requestedValue ≤ max(validValues).If the requested amount exceeds all valid values, the request violates the policy, and this device cannot be allocated.valueQuantity requiredValue defines how much of a certain capacity that device has.This field reflects the fixed total capacity and does not change. The consumed amount is tracked separately by scheduler and does not affect this value.consumesCounters[]DeviceCounterConsumptionConsumesCounters defines a list of references to sharedCounters and the set of counters that the device will consume from those counter sets.There can only be a single entry per counterSet.The total number of device counter consumption entries must be <= 32. In addition, the total number in the entire ResourceSlice must be <= 1024 (for example, 64 devices with 16 counters each).
counterSetstring requiredCounterSet is the name of the set from which the counters defined will be consumed.countersmap[string]Counter requiredCounters defines the counters that will be consumed by the device.The maximum number counters in a device is 32. In addition, the maximum number of all counters in all devices is 1024 (for example, 64 devices with 16 counters each).
valueQuantity requiredValue defines how much of a certain device counter is available.namestring requiredName is unique identifier among all devices managed by the driver in the pool. It must be a DNS label.nodeNamestringNodeName identifies the node where the device is available.Must only be set if Spec.PerDeviceNodeSelection is set to true. At most one of NodeName, NodeSelector and AllNodes can be set.nodeSelectorNodeSelectorNodeSelector defines the nodes where the device is available.Must use exactly one term.Must only be set if Spec.PerDeviceNodeSelection is set to true. At most one of NodeName, NodeSelector and AllNodes can be set.
nodeSelectorTerms[]NodeSelectorTerm requiredRequired. A list of node selector terms. The terms are ORed.
matchExpressions[]NodeSelectorRequirementA list of node selector requirements by node's labels.
keystring requiredThe label key that the selector applies to.operatorstring requiredRepresents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.values[]stringAn array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.matchFields[]NodeSelectorRequirementA list of node selector requirements by node's fields.
keystring requiredThe label key that the selector applies to.operatorstring requiredRepresents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.values[]stringAn array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.taints[]DeviceTaintIf specified, these are the driver-defined taints.The maximum number of taints is 4.This is an alpha field and requires enabling the DRADeviceTaints feature gate.
effectstring requiredThe effect of the taint on claims that do not tolerate the taint and through such claims on the pods using them. Valid effects are NoSchedule and NoExecute. PreferNoSchedule as used for nodes is not valid here.keystring requiredThe taint key to be applied to a device. Must be a label name.timeAddedTimeTimeAdded represents the time at which the taint was added. Added automatically during create or update if not set.valuestringThe taint value corresponding to the taint key. Must be a label value.driverstring requiredDriver identifies the DRA driver providing the capacity information. A field selector can be used to list only ResourceSlice objects with a certain driver name.Must be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. This field is immutable.nodeNamestringNodeName identifies the node which provides the resources in this pool. A field selector can be used to list only ResourceSlice objects belonging to a certain node.This field can be used to limit access from nodes to ResourceSlices with the same node name. It also indicates to autoscalers that adding new nodes of the same type as some old node might also make new resources available.Exactly one of NodeName, NodeSelector, AllNodes, and PerDeviceNodeSelection must be set. This field is immutable.nodeSelectorNodeSelectorNodeSelector defines which nodes have access to the resources in the pool, when that pool is not limited to a single node.Must use exactly one term.Exactly one of NodeName, NodeSelector, AllNodes, and PerDeviceNodeSelection must be set.
nodeSelectorTerms[]NodeSelectorTerm requiredRequired. A list of node selector terms. The terms are ORed.
matchExpressions[]NodeSelectorRequirementA list of node selector requirements by node's labels.
keystring requiredThe label key that the selector applies to.operatorstring requiredRepresents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.values[]stringAn array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.matchFields[]NodeSelectorRequirementA list of node selector requirements by node's fields.
keystring requiredThe label key that the selector applies to.operatorstring requiredRepresents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.values[]stringAn array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.perDeviceNodeSelectionbooleanPerDeviceNodeSelection defines whether the access from nodes to resources in the pool is set on the ResourceSlice level or on each device. If it is set to true, every device defined the ResourceSlice must specify this individually.Exactly one of NodeName, NodeSelector, AllNodes, and PerDeviceNodeSelection must be set.poolResourcePool requiredPool describes the pool that this ResourceSlice belongs to.
generationinteger (int64) requiredGeneration tracks the change in a pool over time. Whenever a driver changes something about one or more of the resources in a pool, it must change the generation in all ResourceSlices which are part of that pool. Consumers of ResourceSlices should only consider resources from the pool with the highest generation number. The generation may be reset by drivers, which should be fine for consumers, assuming that all ResourceSlices in a pool are updated to match or deleted.Combined with ResourceSliceCount, this mechanism enables consumers to detect pools which are comprised of multiple ResourceSlices and are in an incomplete state.namestring requiredName is used to identify the pool. For node-local devices, this is often the node name, but this is not required.It must not be longer than 253 characters and must consist of one or more DNS sub-domains separated by slashes. This field is immutable.resourceSliceCountinteger (int64) requiredResourceSliceCount is the total number of ResourceSlices in the pool at this generation number. Must be greater than zero.Consumers can use this to check whether they have seen all ResourceSlices belonging to the same pool.sharedCounters[]CounterSetSharedCounters defines a list of counter sets, each of which has a name and a list of counters available.The names of the SharedCounters must be unique in the ResourceSlice.The maximum number of counters in all sets is 32.
countersmap[string]Counter requiredCounters defines the set of counters for this CounterSet The name of each counter must be unique in that set and must be a DNS label.The maximum number of counters in all sets is 32.
valueQuantity requiredValue defines how much of a certain device counter is available.namestring requiredName defines the name of the counter set. It must be a DNS label.