-
Notifications
You must be signed in to change notification settings - Fork 867
Description
A new feature was introduced #4246 to make the maximum number of items in a list configurable via the gameservers.lists.maxItems Helm value.
However, the UpdateList sdkserver still uses a hardcoded limit of 1000 (this does not apply any other List method such as AddListValue or RemoveListValue).
agones/pkg/sdkserver/sdkserver.go
Lines 1082 to 1084 in 409a6fc
if in.List.Capacity < 0 || in.List.Capacity > apiserver.ListMaxCapacity { | |
return nil, errors.Errorf("out of range. Capacity must be within range [0,1000]. Found Capacity: %d", in.List.Capacity) | |
} |
agones/pkg/util/apiserver/apiserver.go
Line 64 in 409a6fc
ListMaxCapacity = int64(1000) |
This means that even if a user configures a different gameservers.lists.maxItems
, the SDK will still enforce a limit of 1000.
To fix this, sdkserver should be updated to retrieve the gameservers.lists.maxItems value and use it for validation and remove the apiserver.ListMaxCapacity
.