Skip to content

Commit 1cee368

Browse files
committed
DRA API: bump maximum size of ReservedFor to 256
The original limit of 32 seemed sufficient for a single GPU on a node. But for shared non-local resources it is too low. For example, a ResourceClaim might be used to allocate an interconnect channel that connects all pods of a workload running on several different nodes, in which case the number of pods can be considerably larger. 256 is high enough for currently planned systems. If we need something even higher in the future, an alternative approach might be needed to avoid scalability problems. Normally, increasing such a limit would have to be done incrementally over two releases. In this case we decided on Slack (https://kubernetes.slack.com/archives/CJUQN3E4T/p1734593174791519) to make an exception and apply this change to current master for 1.33 and backport it to the next 1.32.x patch release for production usage. This breaks downgrades to a 1.32 release without this change if there are ResourceClaims with a number of consumers > 32 in ReservedFor. In practice, this breakage is very unlikely because there are no workloads yet which need so many consumers and such downgrades to a previous patch release are also unlikely. Downgrades to 1.31 already weren't supported when using DRA v1beta1.
1 parent a32f695 commit 1cee368

File tree

11 files changed

+19
-19
lines changed

11 files changed

+19
-19
lines changed

api/openapi-spec/swagger.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/openapi-spec/v3/apis__resource.k8s.io__v1alpha3_openapi.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/openapi-spec/v3/apis__resource.k8s.io__v1beta1_openapi.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/apis/resource/types.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -689,7 +689,7 @@ type ResourceClaimStatus struct {
689689
// which issued it knows that it must put the pod back into the queue,
690690
// waiting for the ResourceClaim to become usable again.
691691
//
692-
// There can be at most 32 such reservations. This may get increased in
692+
// There can be at most 256 such reservations. This may get increased in
693693
// the future, but not reduced.
694694
//
695695
// +optional
@@ -717,9 +717,9 @@ type ResourceClaimStatus struct {
717717
Devices []AllocatedDeviceStatus
718718
}
719719

720-
// ReservedForMaxSize is the maximum number of entries in
720+
// ResourceClaimReservedForMaxSize is the maximum number of entries in
721721
// claim.status.reservedFor.
722-
const ResourceClaimReservedForMaxSize = 32
722+
const ResourceClaimReservedForMaxSize = 256
723723

724724
// ResourceClaimConsumerReference contains enough information to let you
725725
// locate the consumer of a ResourceClaim. The user must be a resource in the same

pkg/generated/openapi/zz_generated.openapi.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

staging/src/k8s.io/api/resource/v1alpha3/generated.proto

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

staging/src/k8s.io/api/resource/v1alpha3/types.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,7 @@ type ResourceClaimStatus struct {
687687
// which issued it knows that it must put the pod back into the queue,
688688
// waiting for the ResourceClaim to become usable again.
689689
//
690-
// There can be at most 32 such reservations. This may get increased in
690+
// There can be at most 256 such reservations. This may get increased in
691691
// the future, but not reduced.
692692
//
693693
// +optional
@@ -715,9 +715,9 @@ type ResourceClaimStatus struct {
715715
Devices []AllocatedDeviceStatus `json:"devices,omitempty" protobuf:"bytes,4,opt,name=devices"`
716716
}
717717

718-
// ReservedForMaxSize is the maximum number of entries in
718+
// ResourceClaimReservedForMaxSize is the maximum number of entries in
719719
// claim.status.reservedFor.
720-
const ResourceClaimReservedForMaxSize = 32
720+
const ResourceClaimReservedForMaxSize = 256
721721

722722
// ResourceClaimConsumerReference contains enough information to let you
723723
// locate the consumer of a ResourceClaim. The user must be a resource in the same

staging/src/k8s.io/api/resource/v1alpha3/types_swagger_doc_generated.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

staging/src/k8s.io/api/resource/v1beta1/generated.proto

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

staging/src/k8s.io/api/resource/v1beta1/types.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ type ResourceClaimStatus struct {
695695
// which issued it knows that it must put the pod back into the queue,
696696
// waiting for the ResourceClaim to become usable again.
697697
//
698-
// There can be at most 32 such reservations. This may get increased in
698+
// There can be at most 256 such reservations. This may get increased in
699699
// the future, but not reduced.
700700
//
701701
// +optional
@@ -723,9 +723,9 @@ type ResourceClaimStatus struct {
723723
Devices []AllocatedDeviceStatus `json:"devices,omitempty" protobuf:"bytes,4,opt,name=devices"`
724724
}
725725

726-
// ReservedForMaxSize is the maximum number of entries in
726+
// ResourceClaimReservedForMaxSize is the maximum number of entries in
727727
// claim.status.reservedFor.
728-
const ResourceClaimReservedForMaxSize = 32
728+
const ResourceClaimReservedForMaxSize = 256
729729

730730
// ResourceClaimConsumerReference contains enough information to let you
731731
// locate the consumer of a ResourceClaim. The user must be a resource in the same

0 commit comments

Comments
 (0)