agones
agones copied to clipboard
PlayerTracking: Be able to set GameServer capacity on Allocation
Is your feature request related to a problem? Please describe.
When creating a GameServerAllocation, it would be useful to specify what the player tracking capacity is going to be on the allocated GameServer
Describe the solution you'd like
Draft of what the GameServerAllocation structure could look like (:
apiVersion: "allocation.agones.dev/v1"
kind: GameServerAllocation
spec:
selectors:
- matchLabels:
agones.dev/fleet: lobby
gameServerState: Allocated
players:
minAvailable: 10
maxAvailable: 15
- matchLabels:
agones.dev/fleet: lobby
players: # this is a new section
capacity: 100 # set the capacity to 100
metadata:
labels:
mode: deathmatch
annotations:
map: garden22
Describe alternatives you've considered
We could not do this, and people could pass in a label/annotation to the GameServer, and have it be set by the game server process - but that can take a while, and could introduce more race conditions.
Additional context
- https://agones.dev/site/docs/reference/gameserverallocation/
- https://agones.dev/site/docs/integration-patterns/player-capacity/