Skip to content

Commit 93ade17

Browse files
committed
DRA: extend ResourceQuota section
1 parent 8574145 commit 93ade17

File tree

1 file changed

+27
-4
lines changed
  • keps/sig-node/4381-dra-structured-parameters

1 file changed

+27
-4
lines changed

keps/sig-node/4381-dra-structured-parameters/README.md

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1960,10 +1960,33 @@ through objects with that device class does not exceed the specified limit. When
19601960
define device classes so that they select specific device types, this quota mechanism
19611961
can be used to limit access to those device types.
19621962

1963-
A single request may cause the allocation of multiple devices. For exact
1964-
counts, the quota limit is based on the sum of those exact counts. For requests
1965-
asking for "all" matching devices, the maximum number of allocated devices per
1966-
claim is used as a worst-case upper bound.
1963+
A single request may cause the allocation of multiple devices:
1964+
```
1965+
requests:
1966+
- name: gpus
1967+
allocationMode: exactCount
1968+
count: 5
1969+
```
1970+
1971+
For such exact counts, the quota limit is based on the sum of those exact
1972+
counts.
1973+
1974+
Users may also ask for all devices matching the request:
1975+
```
1976+
requests:
1977+
- name: largeGPUs
1978+
allocationMode: all
1979+
selectors:
1980+
- cel:
1981+
expression: device.capacity["dra.example.com"].memory.isGreaterThan(quantity("4G"))
1982+
```
1983+
1984+
In this case, the exact count is not known at admission time because it depends
1985+
on what information the driver is publishing in ResourceSlices, which will be
1986+
checked during the actual allocation attempt. The number of allocated devices
1987+
per claim is limited to `AllocationResultsMaxSize = 32`. The quota mechanism
1988+
uses that as the worst-case upper bound, so `allocationMode: all` is treated
1989+
like `allocationMode: exactCount` with `count: 32`.
19671990

19681991
Requests asking for "admin access" contribute to the quota. In practice,
19691992
namespaces where such access is allowed will typically not have quotas

0 commit comments

Comments
 (0)