-
Notifications
You must be signed in to change notification settings - Fork 813
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Counters: Default capacity should be 0 (max), not 1000 #3579
Comments
/cc @igooch |
Defaulting is in the CRD: agones/install/helm/agones/templates/crds/_gameserverspecschema.yaml Lines 169 to 173 in 9534c07
|
The number 0 is meaningful for Capacity (there's more places in fleetautoscaler, gameserverallocation, etc.): agones/pkg/apis/agones/v1/gameserver.go Lines 893 to 896 in 9534c07
agones/pkg/sdkserver/sdkserver.go Lines 979 to 982 in 9534c07
It's only the MaxAvailable where 0 = max(int64): agones/pkg/apis/allocation/v1/gameserverallocation.go Lines 160 to 162 in 9534c07
We can set the default to 9223372036854775807, but I don't think we want to make 0 equal MaxInt64 because setting the Capacity to 0 is easiest way for the user to "delete" the Counter since they can't actually delete it. |
aaah yeah, I can 100% see how that makes things way more complicated in the code. I agree, moving it to max(int64) is a better solution 👍🏻 Also making a note we should document this as well, as I think we don't document defaults for @igooch you want to take this, or @Kalaiselvi84 this could be good for you? it's mostly a change in the default specified in #3579 (comment) and then updating the docs around |
I will take on this work.. |
What happened:
Creating a Fleet with the following yaml:
When I look at the resulting yaml output, I see that the default capacity is 1000 in the counter status:
What you expected to happen:
Link to relevant design
capacity
should be 0, since it's a counter, and we don't need to limit its size for performance reasons.How to reproduce it (as minimally and precisely as possible):
Apply yaml above, then
kubectl get gs <name> -o yaml
to see the result.Anything else we need to know?:
N/A
Environment:
kubectl version
): v1.27.7-gke.1056000The text was updated successfully, but these errors were encountered: