Skip to content

Commit 19081f3

Browse files
pohlyk8s-publishing-bot
authored andcommitted
DRA quota: add ResourceClaim v1.ResourceQuota limits
Dynamic resource allocation is similar to storage in the sense that users create ResourceClaim objects to request resources, same as with persistent volume claims. The actual resource usage is only known when allocating claims, but some limits can already be enforced at admission time: - "count/resourceclaims.resource.k8s.io" limits the number of ResourceClaim objects in a namespace; this is a generic feature that is already supported also without this commit. - "resourceclaims" is *not* an alias - use "count/resourceclaims.resource.k8s.io" instead. - <device-class-name>.deviceclass.resource.k8s.io/devices limits the number of ResourceClaim objects in a namespace such that the number of devices requested through those objects with that class does not exceed the limit. A single request may cause the allocation of multiple devices. For exact counts, the quota limit is based on the sum of those exact counts. For requests asking for "all" matching devices, the maximum number of allocated devices per claim is used as a worst-case upper bound. Requests asking for "admin access" contribute to the quota. DRA quota: remove admin mode exception Kubernetes-commit: 299ecde5cc23f185fe4be2cb3bc10619a76880dc
1 parent 3421a80 commit 19081f3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

core/v1/types.go

+2
Original file line numberDiff line numberDiff line change
@@ -6979,6 +6979,8 @@ const (
69796979
ResourceLimitsMemory ResourceName = "limits.memory"
69806980
// Local ephemeral storage limit, in bytes. (500Gi = 500GiB = 500 * 1024 * 1024 * 1024)
69816981
ResourceLimitsEphemeralStorage ResourceName = "limits.ephemeral-storage"
6982+
// resource.k8s.io devices requested with a certain DeviceClass, number
6983+
ResourceClaimsPerClass string = ".deviceclass.resource.k8s.io/devices"
69826984
)
69836985

69846986
// The following identify resource prefix for Kubernetes object types

0 commit comments

Comments
 (0)