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

docs: improve counter and list example comments #3818

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion site/content/en/docs/Guides/counters-and-lists.md
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ to influence the order in which `GameServers` are shutdown and deleted.


While neither `players` or `rooms` are particularly good examples for this functionality, if we wanted to ensure
that `Ready` `GameServers` with the most available capacity `rooms` where a factor when scaling down a `Fleet` we could
that `Ready` `GameServers` with the most available capacity `rooms` were a factor when scaling down a `Fleet` we could
implement the following:

```yaml
Expand Down
29 changes: 25 additions & 4 deletions site/content/en/docs/Reference/fleet.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ spec:
# Which gameservers in the Fleet are most important to keep around - impacts scale down logic.
# priorities:
# - type: Counter # Sort by a “Counter”
# key: player # The name of the Counter. No impact if no GameServer found.
# order: Descending # Default is "Ascending" so smaller capacity will be removed first on down scaling.
# key: rooms # The name of the Counter. No impact if no GameServer found.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah good catch! Thank you! Got that in the examples.yaml, but not here.

https://github.com/googleforgames/agones/blob/main/examples/fleet.yaml has been updated with the move to beta -- but can we make the descriptions match across both (particularly the "available capacity" addition ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the feedback! Changed in 1716e09.

Added the Beta information and made the descriptions in fleet.yaml and fleet.md more consistent.

# order: Descending # Default is "Ascending" so smaller available capacity will be removed first on down scaling.
# - type: List # Sort by a “List”
# key: room # The name of the List. No impact if no GameServer found.
# order: Ascending # Default is "Ascending" so smaller capacity will be removed first on down scaling.
# key: players # The name of the List. No impact if no GameServer found.
# order: Ascending # Default is "Ascending" so smaller available capacity will be removed first on down scaling.
#
template:
# GameServer metadata
Expand All @@ -83,6 +83,27 @@ spec:
logLevel: Info
grpcPort: 9357
httpPort: 9358
#
# [Stage:Alpha]
# [FeatureFlag:CountsAndLists]
# Counts and Lists provides the configuration for generic (player, room, session, etc.) tracking features.
# Commented out since Alpha, and disabled by default
# counters: # counters are int64 counters stored against a GameServer in the fleet that can be incremented and decremented by set amounts. Keys must be declared at Fleet creation time.
# games: # arbitrary key.
# count: 0 # initial value.
# capacity: 100 # (Optional) Defaults to 1000 and setting capacity to max(int64) may lead to issues and is not recommended. See GitHub issue https://github.com/googleforgames/agones/issues/3636 for more details.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# capacity: 100 # (Optional) Defaults to 1000 and setting capacity to max(int64) may lead to issues and is not recommended. See GitHub issue https://github.com/googleforgames/agones/issues/3636 for more details.
# capacity: 100

Thanks for adding the Counter and List example here - was missing!

Since this is the GameServer template, I think we can keep this pretty low on the description, since that's what the GameServer reference is for -- I'd bring this down to the level we have in https://github.com/googleforgames/agones/blob/release-1.40.0/examples/fleet.yaml

Some for the other fields.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed in 188f491 and made both files more consistent.

# sessions:
# count: 0
# lists: # lists are lists of values stored against a GameServer in the fleet that can be added and deleted from. Keys must be declared at Fleet creation time.
# players: # an empty list, with a capacity set to 10.
# capacity: 10 # (Optional) Defaults to 1000.
# rooms:
# capacity: 333
# values: # initial set of values in a list.
# - room1
# - room2
# - room3
#
# The GameServer's Pod template
template:
spec:
Expand Down
Loading