Skip to content

Commit

Permalink
docs: reintroduced more examples for counters and lists
Browse files Browse the repository at this point in the history
This reintroduce usage of rooms as a key in lists to show that it is allowed to have the same key name in between list and counters. Also readded initial values for lists as example.
  • Loading branch information
yonbh committed May 21, 2024
1 parent a2d37c5 commit 07e491d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
8 changes: 7 additions & 1 deletion examples/gameserver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,17 @@ spec:
# Now in Beta, and enabled by default
counters: # counters are int64 counters that can be incremented and decremented by set amounts. Keys must be declared at GameServer creation time.
rooms: # arbitrary key.
count: 1 # initial value.
count: 1 # initial value can be set.
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.
lists: # lists are lists of values stored against this GameServer that can be added and deleted from. Keys must be declared at GameServer creation time.
players: # an empty list, with a capacity set to 10.
capacity: 10 # capacity value, defaults to 1000.
rooms: # note that it is allowed to have the same key name with one used in counters
capacity: 5
values: # initial values can also be set for lists
- room1
- room2
- room3
# Pod template configuration
template:
# pod metadata. Name & Namespace is overwritten
Expand Down
16 changes: 14 additions & 2 deletions site/content/en/docs/Reference/gameserver.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,17 @@ spec:
# Commented out since Alpha, and disabled by default
# counters: # counters are int64 counters that can be incremented and decremented by set amounts. Keys must be declared at GameServer creation time.
# rooms: # arbitrary key.
# count: 1 # initial value.
# count: 1 # initial value can be set.
# 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.
# lists: # lists are lists of values stored against this GameServer that can be added and deleted from. Keys must be declared at GameServer creation time.
# players: # an empty list, with a capacity set to 10.
# capacity: 10 # capacity value, defaults to 1000.
# rooms: # note that it is allowed to have the same key name with one used in counters
# capacity: 5
# values: # initial values can also be set for lists
# - room1
# - room2
# - room3
#
# Pod template configuration
# {{< k8s-api-version href="#podtemplate-v1-core" >}}
Expand Down Expand Up @@ -191,11 +197,17 @@ spec:
# Now in Beta, and enabled by default
counters: # counters are int64 counters that can be incremented and decremented by set amounts. Keys must be declared at GameServer creation time.
rooms: # arbitrary key.
count: 1 # initial value.
count: 1 # initial value can be set.
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.
lists: # lists are lists of values stored against this GameServer that can be added and deleted from. Keys must be declared at GameServer creation time.
players: # an empty list, with a capacity set to 10.
capacity: 10 # capacity value, defaults to 1000.
rooms: # note that it is allowed to have the same key name with one used in counters
capacity: 5
values: # initial values can also be set for lists
- room1
- room2
- room3
# Pod template configuration
# {{< k8s-api-version href="#podtemplate-v1-core" >}}
template:
Expand Down

0 comments on commit 07e491d

Please sign in to comment.