@@ -260,6 +260,50 @@ When the feature is disabled, that field automatically gets cleared when storing
260
260
A ResourceClaim device status is supported when it is possible, from a DRA driver, to update an
261
261
existing ResourceClaim where the `status.devices` field is set.
262
262
263
+ # # Prioritized List
264
+
265
+ {{< feature-state feature_gate_name="DRAPrioritizedList" >}}
266
+
267
+ You can provide a prioritized list of subrequests for requests in a ResourceClaim. The
268
+ scheduler will then select the first subrequest that can be allocated. This allows users to
269
+ specify alternative devices that can be used by the workload if the primary choice is not
270
+ available.
271
+
272
+ In the example below, the ResourceClaimTemplate requested a device with the color black
273
+ and the size large. If a device with those attributes are not available, the pod can not
274
+ be scheduled. With the priotized list feature, a second alternative can be specified, which
275
+ requests two devices with the color white and size small. The large black device will be
276
+ allocated if it is available. But if it is not and two small white devices are available,
277
+ the pod will still be able to run.
278
+
279
+ ` ` ` yaml
280
+ apiVersion: resource.k8s.io/v1beta1
281
+ kind: ResourceClaimTemplate
282
+ metadata:
283
+ name: prioritized-list-claim-template
284
+ spec:
285
+ spec:
286
+ devices:
287
+ requests:
288
+ - name: req-0
289
+ firstAvailable:
290
+ - name: large-black
291
+ deviceClassName: resource.example.com
292
+ selectors:
293
+ - cel:
294
+ expression: |-
295
+ device.attributes["resource-driver.example.com"].color == "black" &&
296
+ device.attributes["resource-driver.example.com"].size == "large"
297
+ - name: small-white
298
+ deviceClassName: resource.example.com
299
+ selectors:
300
+ - cel:
301
+ expression: |-
302
+ device.attributes["resource-driver.example.com"].color == "white" &&
303
+ device.attributes["resource-driver.example.com"].size == "small"
304
+ count: 2
305
+ ` ` `
306
+
263
307
# # Enabling dynamic resource allocation
264
308
265
309
Dynamic resource allocation is a *beta feature* which is off by default and only enabled when the
@@ -314,6 +358,14 @@ and only enabled when the `DRAResourceClaimDeviceStatus`
314
358
[feature gate](/docs/reference/command-line-tools-reference/feature-gates/)
315
359
is enabled in the kube-apiserver.
316
360
361
+ # ## Enabling Prioritized List
362
+
363
+ [Prioritized List](#prioritized-list)) is an *alpha feature* and only enabled when the
364
+ ` DRAPrioritizedList` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/)
365
+ is enabled in the kube-apiserver and kube-scheduler. It also requires that the
366
+ ` DynamicResourceAllocation` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/)
367
+ is enabled.
368
+
317
369
# # {{% heading "whatsnext" %}}
318
370
319
371
- For more information on the design, see the
0 commit comments