@@ -258,7 +258,7 @@ real time changes of the state of the device.
258
258
When the feature is disabled, that field automatically gets cleared when storing the ResourceClaim.
259
259
260
260
A ResourceClaim device status is supported when it is possible, from a DRA driver, to update an
261
- existing ResourceClaim where the `status.devices` field is set.
261
+ existing ResourceClaim where the `status.devices` field is set.
262
262
263
263
# # Prioritized List
264
264
@@ -304,6 +304,59 @@ spec:
304
304
count: 2
305
305
` ` `
306
306
307
+ # # Partitionable Devices
308
+
309
+ {{< feature-state feature_gate_name="DRAPartitionableDevices" >}}
310
+
311
+ Devices represented in DRA don't necessarily have to be a single unit connected to a single machine,
312
+ but can also be a logical device comprised of multiple devices connected to multiple machines. These
313
+ devices might consume overlapping resources of the underlying phyical devices, meaning that when one
314
+ logical device is allocated other devices will no longer be available.
315
+
316
+ In the ResourceSlice API, this is represented as a list of named CounterSets, each of which
317
+ contains a set of named counters. The counters represent the resources available on the physical
318
+ device that are used by the logical devices advertised through DRA.
319
+
320
+ Logical devices can specify the ConsumesCounters list. Each entry contains a reference to a CounterSet
321
+ and a set of named counters with the amounts they will consume. So for a device to be allocatable,
322
+ the referenced counter sets must have sufficient quantity for the counters referenced by the device.
323
+
324
+ Here is an example of two devices, each consuming 6Gi of memory from the a shared counter with
325
+ 8Gi of memory. Thus, only one of the devices can be allocated at any point in time. The scheduler
326
+ handles this and it is transparent to the consumer as the ResourceClaim API is not affected.
327
+
328
+ ` ` ` yaml
329
+ kind: ResourceSlice
330
+ apiVersion: resource.k8s.io/v1beta1
331
+ metadata:
332
+ name: resourceslice
333
+ spec:
334
+ nodeName: worker-1
335
+ pool:
336
+ name: pool
337
+ generation: 1
338
+ resourceSliceCount: 1
339
+ driver: dra.example.com
340
+ sharedCounters:
341
+ - name: gpu-1-counters
342
+ counters:
343
+ memory:
344
+ value: 8Gi
345
+ devices:
346
+ - name: device-1
347
+ consumesCounters:
348
+ - counterSet: gpu-1-counters
349
+ counters:
350
+ memory:
351
+ value: 6Gi
352
+ - name: device-2
353
+ consumesCounters:
354
+ - counterSet: gpu-1-counters
355
+ counters:
356
+ memory:
357
+ value: 6Gi
358
+ ` ` `
359
+
307
360
# # Enabling dynamic resource allocation
308
361
309
362
Dynamic resource allocation is a *beta feature* which is off by default and only enabled when the
@@ -366,6 +419,13 @@ is enabled in the kube-apiserver and kube-scheduler. It also requires that the
366
419
` DynamicResourceAllocation` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/)
367
420
is enabled.
368
421
422
+ # ## Enabling Partitionable Devices
423
+
424
+ [Partitionable Devices](#partitionable-devices) is an *alpha feature*
425
+ and only enabled when the `DRAPartitionableDevices`
426
+ [feature gate](/docs/reference/command-line-tools-reference/feature-gates/)
427
+ is enabled in the kube-apiserver and kube-scheduler.
428
+
369
429
# # {{% heading "whatsnext" %}}
370
430
371
431
- For more information on the design, see the
0 commit comments