Skip to content
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

allocationOverflow documentation issue #3361

Closed
joeholley opened this issue Sep 5, 2023 · 3 comments · Fixed by #3368
Closed

allocationOverflow documentation issue #3361

joeholley opened this issue Sep 5, 2023 · 3 comments · Fixed by #3368
Labels
good first issue These are great first issues. If you are looking for a place to start, start here! help wanted We would love help on these issues. Please come help us! kind/bug These are bugs. kind/documentation Documentation for Agones

Comments

@joeholley
Copy link
Collaborator

joeholley commented Sep 5, 2023

https://agones.dev/site/docs/reference/fleet/ is the page this issue refers to.

The fleet spec example says this:

  # [Stage:Alpha]
  # [FeatureFlag:FleetAllocationOverflow]
  # Labels and/or Annotations to apply to overflowing GameServers when the number of Allocated
  # GameServers is more than the desired replicas on the underlying GameServerSet 

But the description below it says:

allocationOverflow (Alpha, requires FleetAllocationOverflow flag) The labels and/or Annotations to apply to GameServers when the number of Allocated GameServers drops below the desired replicas on the underlying GameServerSet.

So, the fleet spec says the labels/annotations are applied when there are more allocated gameservers than the number of desired replicas, but the documentation description says the labels/annotations are applied when there are fewer? Unless I'm misreading this.

Also, the spec seems to indicate the labels/annotations are applied only to some gameservers (those who are 'overflowing'), while the description seems to imply it will be applied to all servers. I think the latter is true, unless you're flagging specific gameservers as 'overflowing' the desired number of replicas - and if you are, the docs should explain the criteria for which gameservers are chosen to get this state and which aren't (I read through #2682 and didn't see discussion of this; I suspect it's not specified so defaulting to the order k8s returns gameservers in when queried which would equate to random, but whatever it is should be documented).

@joeholley joeholley changed the title Fleet Specification allocationOverflow documentation issue Sep 5, 2023
@markmandel markmandel added kind/bug These are bugs. help wanted We would love help on these issues. Please come help us! good first issue These are great first issues. If you are looking for a place to start, start here! kind/documentation Documentation for Agones labels Sep 6, 2023
@markmandel
Copy link
Member

Good catch - this is the canonical reference:
https://agones.dev/site/docs/guides/fleet-updates/#notifying-gameservers-on-fleet-updatedownscale

So this section is wrong:

allocationOverflow (Alpha, requires FleetAllocationOverflow flag) The labels and/or Annotations to apply to GameServers when the number of Allocated GameServers drops below the desired replicas on the underlying GameServerSet.

It should be more not less.

And you are also correct in that only the some (the difference between the number allocated - desired) are marked as "overflow".

As per:

rest = SortGameServersByStrategy(gsSet.Spec.Scheduling, rest, c.counter.Counts(), gsSet.Spec.Priorities)
rest = rest[:(overflow - matches)]

We do also sort based on the Strategy defined by the Fleet - so either Packed or Distributed. This is also good to document somewhere.

@markmandel
Copy link
Member

@Kalaiselvi84 or @ashutosji - are one of you able take this on please at some point?

@Kalaiselvi84
Copy link
Contributor

I will take on this work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue These are great first issues. If you are looking for a place to start, start here! help wanted We would love help on these issues. Please come help us! kind/bug These are bugs. kind/documentation Documentation for Agones
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants