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

CountersAndLists in Reference Documentation #3529

Conversation

Kalaiselvi84
Copy link
Contributor

@Kalaiselvi84 Kalaiselvi84 commented Dec 4, 2023

What type of PR is this?

Uncomment only one /kind <> line, press enter to put that in a new line, and remove leading whitespace from that line:

/kind breaking
/kind bug
/kind cleanup
/kind documentation
/kind feature
/kind hotfix
/kind release

What this PR does / Why we need it:

Which issue(s) this PR fixes:

Work on #2716

Special notes for your reviewer:

Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Kalaiselvi84
Once this PR has been reviewed and has the lgtm label, please assign roberthbailey for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@github-actions github-actions bot added the kind/feature New features for Agones label Dec 4, 2023
@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 72445e26-0c22-4e97-95e2-8af9f524886f

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@Kalaiselvi84
Copy link
Contributor Author

Kalaiselvi84 commented Dec 4, 2023

@markmandel, We have two YAML files for counters and lists related to the FleetAutoscaler in the /examples folder, as outlined in the design -> #2716. Could you clarify the next steps for the Reference Document on FleetAutoScaler Specification? Also, I'm unsure about the action item for the Critical User Journeys mentioned in #2716

@markmandel
Copy link
Collaborator

Looks like a weird flake in the integration tests:

E: Fetched 1533 kB in 3s (517 kB/s)
Failed to fetch https://packages.microsoft.com/ubuntu/18.04/prod/pool/main/d/dotnet-runtime-deps-7.0/dotnet-runtime-deps-7.0_7.0.10-1_amd64.deb  403  Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature. [IP: 13.93.224.173 443]
E: Failed to fetch https://packages.microsoft.com/ubuntu/18.04/prod/pool/main/d/dotnet-hostfxr-7.0/dotnet-hostfxr-7.0_7.0.10-1_amd64.deb  403  Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature. [IP: 13.93.224.173 443]
E: Failed to fetch https://packages.microsoft.com/ubuntu/18.04/prod/pool/main/d/dotnet-runtime-7.0/dotnet-runtime-7.0_7.0.10-1_amd64.deb  403  Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature. [IP: 13.93.224.173 443]
E: Failed to fetch https://packages.microsoft.com/ubuntu/18.04/prod/pool/main/a/aspnetcore-runtime-7.0/aspnetcore-runtime-7.0_7.0.10-1_amd64.deb  403  Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature. [IP: 13.93.224.173 443]
E: Failed to fetch https://packages.microsoft.com/ubuntu/18.04/prod/pool/main/d/dotnet-targeting-pack-7.0/dotnet-targeting-pack-7.0_7.0.10-1_amd64.deb  403  Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature. [IP: 13.93.224.173 443]
E: Failed to fetch https://packages.microsoft.com/ubuntu/18.04/prod/pool/main/a/aspnetcore-targeting-pack-7.0/aspnetcore-targeting-pack-7.0_7.0.10-1_amd64.deb  403  Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature. [IP: 13.93.224.173 443]
E: Failed to fetch https://packages.microsoft.com/ubuntu/18.04/prod/pool/main/d/dotnet-apphost-pack-7.0/dotnet-apphost-pack-7.0_7.0.10-1_amd64.deb  403  Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature. [IP: 13.93.224.173 443]
E: Failed to fetch https://packages.microsoft.com/ubuntu/18.04/prod/pool/main/d/dotnet-sdk-7.0/dotnet-sdk-7.0_7.0.400-1_amd64.deb  403  Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature. [IP: 13.93.224.173 443]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

@markmandel
Copy link
Collaborator

markmandel commented Dec 5, 2023

A good start!

@markmandel, We have two YAML files for counters and lists related to the FleetAutoscaler in the /examples folder, as outlined in the design -> #2716.

Ah - good question. We should have a separate file for each - for example we have https://github.com/googleforgames/agones/blob/main/examples/webhookfleetautoscaler.yaml for the webhook autoscaler type autoscaling.

Could you clarify the next steps for the Reference Document on FleetAutoScaler Specification?

Ah also a good question - we'll also want new sections in the FleetAutoscaler documentation as well - much like we have a new section for the "Or for Webhook FleetAutoscaler below and in example folder :" section.

Also, I'm unsure about the action item for the Critical User Journeys mentioned in #2716

You can ignore that section for now, that can be integrated into some more advanced usage documentation in the future. For now we'll focus on just reference documentation for the yaml files.

@Kalaiselvi84
Copy link
Contributor Author

Ah also a good question - we'll also want new sections in the FleetAutoscaler documentation as well - much like we have a new section for the "Or for Webhook FleetAutoscaler below and in example folder :" section.

Included counters and lists based Fleetautoscaler specifications.👍🏻

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 5e84c4b1-d9b3-4938-9c7b-25a656c8114b

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/googleforgames/agones.git pull/3529/head:pr_3529 && git checkout pr_3529
  • helm install agones ./install/helm/agones --namespace agones-system --set agones.image.registry=us-docker.pkg.dev/agones-images/ci --set agones.image.tag=1.37.0-dev-19d25a7-amd64

@Kalaiselvi84 Kalaiselvi84 requested a review from igooch December 7, 2023 23:55
Copy link
Collaborator

@markmandel markmandel left a comment

Choose a reason for hiding this comment

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

Need to do a pass to make sure all the things we had in the design match up to what we finished with, but the approach is good

site/content/en/docs/Reference/fleet.md Show resolved Hide resolved
@github-actions github-actions bot added the size/M label Dec 8, 2023
@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 5c757714-16d9-459b-9a8f-065989ae08ef

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@markmandel
Copy link
Collaborator

markmandel commented Dec 8, 2023

I think I fixed this flake in #3534

{"message":"adding gsSet","severity":"info","time":"2023-12-08T01:23:45.014332738Z"}
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x25776e2]

goroutine 321 [running]:
agones.dev/agones/pkg/gameserversets.(*AllocationOverflowController).Run(0x0, {0x2dff5c8, 0xc0004b6c60})
	/go/src/agones.dev/agones/pkg/gameserversets/allocation_overflow.go:98 +0x42
agones.dev/agones/pkg/gameserversets.(*Controller).Run.func1()
	/go/src/agones.dev/agones/pkg/gameserversets/controller.go:194 +0x85
created by agones.dev/agones/pkg/gameserversets.(*Controller).Run
	/go/src/agones.dev/agones/pkg/gameserversets/controller.go:193 +0x33b
FAIL	agones.dev/agones/pkg/gameserversets	0.428s
ok  	agones.dev/agones/pkg/metrics	11.132s

This reverts commit 59900ca.
@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 4fc319ec-12c7-403d-91f5-f386a87f8615

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

Copy link
Collaborator

@igooch igooch left a comment

Choose a reason for hiding this comment

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

Overall looks good! Just a few minor additions to add.

site/content/en/docs/Reference/fleet.md Show resolved Hide resolved
@@ -47,6 +47,65 @@ spec:
seconds: 30
```

{{% feature publishVersion="1.37.0" %}}
Copy link
Collaborator

Choose a reason for hiding this comment

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

In terms of ordering the page, the Counters and Lists examples should probably go after the webhook autoscaling example since they're still in Alpha.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Similar comment to what Mark mentioned in fleet.md. Mention Counters and Lists in the bullet point notes below the examples

- `players` (Alpha, behind "PlayerTracking" feature gate), sets this GameServer's initial player capacity

Copy link
Collaborator

@markmandel markmandel left a comment

Choose a reason for hiding this comment

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

Went through the listed items, and checked to see if everything was there, and did a review of the existing language we had.

@igooch would love your extra review, see if I missed anything, anything needs adding or wrote anything weird 😄

I've also got a PR incoming, with some tweaks to the Go CRD datasture comments to reflect some of these changes, need to make a couple more tweaks and will then submit it.

site/content/en/docs/Reference/fleetautoscaler.md Outdated Show resolved Hide resolved
site/content/en/docs/Reference/fleetautoscaler.md Outdated Show resolved Hide resolved
site/content/en/docs/Reference/gameserver.md Outdated Show resolved Hide resolved
site/content/en/docs/Reference/gameserver.md Outdated Show resolved Hide resolved
site/content/en/docs/Reference/gameserver.md Outdated Show resolved Hide resolved
site/content/en/docs/Reference/gameserver.md Outdated Show resolved Hide resolved
site/content/en/docs/Reference/gameserverallocation.md Outdated Show resolved Hide resolved
@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 00dbfe2a-5406-4bb2-9a6f-35969da61f92

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/googleforgames/agones.git pull/3529/head:pr_3529 && git checkout pr_3529
  • helm install agones ./install/helm/agones --namespace agones-system --set agones.image.registry=us-docker.pkg.dev/agones-images/ci --set agones.image.tag=1.37.0-dev-faaf078-amd64

@Kalaiselvi84
Copy link
Contributor Author

@markmandel I've added the CountsAndLists feature to the spec field in both the fleet.md and gameserverallocation.md files. Please review them and let me know if I am missing anything. Thanks!

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 284911a3-79ce-4757-8075-07744eaf3770

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: a7dddac9-ce8b-468d-a744-81940fc9ce97

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

Comment on lines 245 to 247
- `type: List`: Sorts GameServers based on a list metric.
- `key`: The name of the List. No impact if no GameServer found.
- `order`: The sort order, default is "Ascending" so smaller capacity will be removed first on downscaling.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- `type: List`: Sorts GameServers based on a list metric.
- `key`: The name of the List. No impact if no GameServer found.
- `order`: The sort order, default is "Ascending" so smaller capacity will be removed first on downscaling.

Comment on lines 242 to 244
- `type: Counter`: Sorts GameServers by a "counter".
- `key`: The name of the Counter. No impact if no GameServer found.
- `order`: The sort order, default is "Ascending" so smaller capacity will be removed first on down scaling.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Lifting from http://localhost:1313/docs/reference/agones_crd_api_reference/#agones.dev/v1.Priority

Suggested change
- `type: Counter`: Sorts GameServers by a "counter".
- `key`: The name of the Counter. No impact if no GameServer found.
- `order`: The sort order, default is "Ascending" so smaller capacity will be removed first on down scaling.
- `type`: Sort by a “Counter” or a “List”.
- `key`: The name of the Counter or List. If not found on the GameServer, has no impact.
- `order`: Order: Sort by “Ascending” or “Descending”. “Descending” a bigger Capacity is preferred. “Ascending” would be smaller Capacity is preferred.

@@ -226,6 +238,13 @@ The `spec` field is the actual `Fleet` specification and it is composed as follo
- `Fleet's Scheduling Strategy`: The GameServers associated with the GameServerSet are sorted based on either `Packed` or `Distributed` strategy.
- `Packed`: Agones maximizes resource utilization by trying to populate nodes that are already in use before allocating GameServers to other nodes.
- `Distributed`: Agones employs this strategy to spread out GameServer allocations, ensuring an even distribution of GameServers across the available nodes.
- `priorities` (Alpha, requires `CountsAndLists` feature flag): Defines which gameservers in the Fleet are most important to keep around - impacts scale down logic.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Tweaking some formatting and docs, but this is exactly what we need here and in the other .md files in this PR 👍🏻

Suggested change
- `priorities` (Alpha, requires `CountsAndLists` feature flag): Defines which gameservers in the Fleet are most important to keep around - impacts scale down logic.
- `priorities`: (Alpha, requires `CountsAndLists` feature flag): Defines which gameservers in the Fleet are most important to keep around - impacts scale down logic.

# nodeSelector:
# kubernetes.io/os: windows
```
{{% /feature %}}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same as the markdown files - need each of the fields described below please (line 219 onwards)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think you intended for the counters and lists fields to be included within the spec field?

maxCapacity: 100
```
{{% /feature %}}

Copy link
Collaborator

Choose a reason for hiding this comment

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

Same as you did in fleet.md - need the fields desribed in the section from 144 onwards.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

same doubt, the fields in the counter and list for the autoscaling to be included in the spec field?

# containsValue: "x6k8z" # only match GameServers who has this value in the list. Defaults to "", which is all.
# minAvailable: 1 # minimum available (current capacity - current count). Defaults to 0.
# maxAvailable: 10 # maximum available (current capacity - current count) Defaults to 0, which translates to max(int64)
#
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
#
# counters: # (Alpha, CountsAndLists feature flag) Counter actions to perform during allocation.
# rooms:
# action: increment # Either “Increment” or “Decrement” the Counter’s Count.
# amount: 1 # Amount is the amount to increment or decrement the Count. Must be a positive integer.
# capacity: 5 # Amount to update the maximum capacity of the Counter to this number. Min 0, Max int64.
# lists: # (Alpha, CountsAndLists feature flag) List actions to perform during allocation.
# players:
# addValues: # appends values to a List’s Values array. Any duplicate values will be ignored
# - x7un
# - 8inz
# capacity: 40 # Updates the maximum capacity of the Counter to this number. Min 0, Max 1000.
#

Please add this in (this was the actions mentioned previously) - and also make sure it shows up in the field description section below.

@igooch did I mess anything up there?

Comment on lines 277 to 279
- `CountsAndLists` has two key elements for game server allocation process.
- `counters` allows setting limits on game server, such as the minimum and maximum number of active rooms. This helps in selecting game servers based on their current activity or capacity.
- `lists` enables game server allocation based on specific player lists, allowing for inclusion or exclusion of specific players.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- `CountsAndLists` has two key elements for game server allocation process.
- `counters` allows setting limits on game server, such as the minimum and maximum number of active rooms. This helps in selecting game servers based on their current activity or capacity.
- `lists` enables game server allocation based on specific player lists, allowing for inclusion or exclusion of specific players.
- `counters` (Alpha, CountsAndLists feature flag) allows setting limits on game server, such as the minimum and maximum number of active rooms. This helps in selecting game servers based on their current activity or capacity.
- `lists` (Alpha, CountsAndLists feature flag) enables game server allocation based on specific player lists, allowing for inclusion or exclusion of specific players.

Also these new property values will need to have feature shortcodes please as well everywhere.

@Kalaiselvi84
Copy link
Contributor Author

Please feel free to resolve the conversations if you're satisfied with the changes😅

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: c6e8bb7c-733b-4611-b8bb-3184e02ddfaa

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/googleforgames/agones.git pull/3529/head:pr_3529 && git checkout pr_3529
  • helm install agones ./install/helm/agones --namespace agones-system --set agones.image.registry=us-docker.pkg.dev/agones-images/ci --set agones.image.tag=1.37.0-dev-45363d9-amd64

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 7b6fa25b-a946-4864-8ca2-905a2ef1cb43

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/googleforgames/agones.git pull/3529/head:pr_3529 && git checkout pr_3529
  • helm install agones ./install/helm/agones --namespace agones-system --set agones.image.registry=us-docker.pkg.dev/agones-images/ci --set agones.image.tag=1.37.0-dev-0735fbf-amd64

@Kalaiselvi84 Kalaiselvi84 requested a review from gongmax December 18, 2023 16:40
# bufferSize can be specified either in absolute (i.e. 5) or percentage format (i.e. 5%).
# Required.
# BufferSize is the size of a buffer of counted items that are available in the Fleet (available capacity).
# Value can be an absolute number (ex: 5) or a percentage of desired gs instances (ex: 5%).
Copy link
Collaborator

Choose a reason for hiding this comment

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

The percentage buffer refers to the Counter available capacity, not the number of game server instances.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have updated both the counterfleetautoscaler.yaml and fleetautoscaler.md files with this information

# When bufferSize in percentage format is used, minCapacity should be set and more than 0.
# MinCapacity is the minimum aggregate Counter total capacity across the fleet.
# If zero, MinCapacity is ignored.
# If non zero, MinCapacity must be smaller than MaxCapacity and bigger than BufferSize.
Copy link
Collaborator

Choose a reason for hiding this comment

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

MinCapacity can be >= BufferSize.

# If minCapacity is not specified, the effective minimum capacity will be bufferSize.
# When bufferSize in percentage format is used, minCapacity should be set and more than 0.
# MinCapacity is the minimum aggregate Counter total capacity across the fleet.
# If zero, MinCapacity is ignored.
Copy link
Collaborator

Choose a reason for hiding this comment

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

If BufferSize is a percentage MinCapacity is required and cannot be 0.

# Maximum aggregate counter capacity that can be provided by this FleetAutoscaler.
# Required.
# MaxCapacity is the maximum aggregate Counter total capacity across the fleet.
# MaxCapacity must be bigger than both MinCapacity and BufferSize. Required field.
Copy link
Collaborator

Choose a reason for hiding this comment

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

MaxCapacity can be >= BufferSize and MinCapacity.

# When bufferSize in percentage format is used, minCapacity should be set and more than 0.
# MinCapacity is the minimum aggregate List total capacity across the fleet.
# If zero, it is ignored.
# If non zero, it must be smaller than MaxCapacity and bigger than BufferSize.
Copy link
Collaborator

Choose a reason for hiding this comment

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

MinCapacity can be >= BufferSize.

# Maximum aggregate list capacity that can be provided by this FleetAutoscaler.
# Required.
# MaxCapacity is the maximum aggregate List total capacity across the fleet.
# MaxCapacity must be bigger than both MinCapacity and BufferSize. Required field.
Copy link
Collaborator

Choose a reason for hiding this comment

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

MaxCapacity can be >= BufferSize and MinCapacity.

Comment on lines 207 to 218
# counters: # (Alpha, CountsAndLists feature flag) Counter actions to perform during allocation.
# rooms:
# action: increment # Either "Increment" or "Decrement" the Counter’s Count.
# amount: 1 # Amount is the amount to increment or decrement the Count. Must be a positive integer.
# capacity: 5 # Amount to update the maximum capacity of the Counter to this number. Min 0, Max int64.
# lists: # (Alpha, CountsAndLists feature flag) List actions to perform during allocation.
# players:
# addValues: # appends values to a List’s Values array. Any duplicate values will be ignored
# - x7un
# - 8inz
# capacity: 40 # Updates the maximum capacity of the Counter to this number. Min 0, Max 1000.
#
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
# counters: # (Alpha, CountsAndLists feature flag) Counter actions to perform during allocation.
# rooms:
# action: increment # Either "Increment" or "Decrement" the Counter’s Count.
# amount: 1 # Amount is the amount to increment or decrement the Count. Must be a positive integer.
# capacity: 5 # Amount to update the maximum capacity of the Counter to this number. Min 0, Max int64.
# lists: # (Alpha, CountsAndLists feature flag) List actions to perform during allocation.
# players:
# addValues: # appends values to a List’s Values array. Any duplicate values will be ignored
# - x7un
# - 8inz
# capacity: 40 # Updates the maximum capacity of the Counter to this number. Min 0, Max 1000.
#

Comment on lines 195 to 206
# priorities:
# counters: # selector for counter current values of a GameServer count
# rooms:
# minCount: 1 # minimum value. Defaults to 0.
# maxCount: 5 # maximum value. Defaults to max(int64)
# minAvailable: 1 # minimum available (current capacity - current count). Defaults to 0.
# maxAvailable: 10 # maximum available (current capacity - current count) Defaults to max(int64)
# lists:
# players:
# containsValue: "x6k8z" # only match GameServers who has this value in the list. Defaults to "", which is all.
# minAvailable: 1 # minimum available (current capacity - current count). Defaults to 0.
# maxAvailable: 10 # maximum available (current capacity - current count) Defaults to 0, which translates to max(int64)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
# priorities:
# counters: # selector for counter current values of a GameServer count
# rooms:
# minCount: 1 # minimum value. Defaults to 0.
# maxCount: 5 # maximum value. Defaults to max(int64)
# minAvailable: 1 # minimum available (current capacity - current count). Defaults to 0.
# maxAvailable: 10 # maximum available (current capacity - current count) Defaults to max(int64)
# lists:
# players:
# containsValue: "x6k8z" # only match GameServers who has this value in the list. Defaults to "", which is all.
# minAvailable: 1 # minimum available (current capacity - current count). Defaults to 0.
# maxAvailable: 10 # maximum available (current capacity - current count) Defaults to 0, which translates to max(int64)
# counters: # selector for counter current values of a GameServer count
# rooms:
# minCount: 1 # minimum value. Defaults to 0.
# maxCount: 5 # maximum value. Defaults to max(int64)
# minAvailable: 1 # minimum available (current capacity - current count). Defaults to 0.
# maxAvailable: 10 # maximum available (current capacity - current count) Defaults to max(int64)
# lists:
# players:
# containsValue: "x6k8z" # only match GameServers who has this value in the list. Defaults to "", which is all.
# minAvailable: 1 # minimum available (current capacity - current count). Defaults to 0.
# maxAvailable: 10 # maximum available (current capacity - current count) Defaults to 0, which translates to max(int64)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Add below suggested code after (and inline with) "metadata".

  # [Stage:Alpha]
  # [FeatureFlag:CountsAndLists]
  # The first Priority on the array of Priorities is the most important for sorting. The allocator will
  # use the first priority for sorting GameServers by available Capacity in the Selector set. Acts as a
  # tie-breaker after sorting the game servers by State and Strategy Packed. Impacts which GameServer
  # is checked first. Optional.
  # priorities:
  # - type: List  # Whether a Counter or a List.
  #   key: rooms  # The name of the Counter or List.
  #   order: Ascending  # "Ascending" lists smaller available capacity first.
  # [Stage:Alpha]
  # [FeatureFlag:CountsAndLists]
  # Counter actions to perform during allocation. Optional.
  # counters:
  #   rooms:
  #     action: increment # Either "Increment" or "Decrement" the Counter’s Count.
  #     amount: 1 # Amount is the amount to increment or decrement the Count. Must be a positive integer.
  #     capacity: 5 # Amount to update the maximum capacity of the Counter to this number. Min 0, Max int64.
  # List actions to perform during allocation. Optional.
  # lists:
  #   players:
  #     addValues: # appends values to a List’s Values array. Any duplicate values will be ignored
  #       - x7un
  #       - 8inz
  #     capacity: 40 # Updates the maximum capacity of the Counter to this number. Min 0, Max 1000.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Under "selectors is an ordered list of..." add:

  - `matchLabels` is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element
    of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value".
    The requirements are ANDed. Optional.
  - `matchExpressions` is a list of label selector requirements. The requirements are ANDed. Optional.
  - `gameServerState` GameServerState specifies which State is the filter to be used when attempting to retrieve a
    GameServer via Allocation. Defaults to "Ready". The only other option is "Allocated", which can be used in
    conjunction with label/annotation/player selectors to retrieve an already Allocated GameServer.
  - `counters` (Alpha, "CountsAndLists" feature flag) enables filtering based on game server Counter status, such as
    the minimum and maximum number of active rooms. This helps in selecting game servers based on their current activity
    or capacity. Optional.
  - `lists` (Alpha, "CountsAndLists" feature flag) enables filtering based on game server List status, such as allowing
    for inclusion or exclusion of specific players. Optional.

Comment on lines 322 to 324
- `priorities` (Alpha, requires `CountsAndLists` feature flag) manages counters and lists for game servers, setting limits on room counts and player inclusion/exclusion.
- `counters` (Alpha, "CountsAndLists" feature flag) allows setting limits on game server, such as the minimum and maximum number of active rooms. This helps in selecting game servers based on their current activity or capacity.
- `lists` (Alpha, "CountsAndLists" feature flag) enables game server allocation based on specific player lists, allowing for inclusion or exclusion of specific players.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- `priorities` (Alpha, requires `CountsAndLists` feature flag) manages counters and lists for game servers, setting limits on room counts and player inclusion/exclusion.
- `counters` (Alpha, "CountsAndLists" feature flag) allows setting limits on game server, such as the minimum and maximum number of active rooms. This helps in selecting game servers based on their current activity or capacity.
- `lists` (Alpha, "CountsAndLists" feature flag) enables game server allocation based on specific player lists, allowing for inclusion or exclusion of specific players.
- `priorities` (Alpha, requires `CountsAndLists` feature flag) manages counters and lists for game servers, setting limits on
room counts and player inclusion/exclusion.
- `counters` (Alpha, "CountsAndLists" feature flag) Counter actions to perform during allocation.
- `lists` (Alpha, "CountsAndLists" feature flag) List actions to perform during allocation.

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: e778c69f-0c7e-41b4-b561-4e05387b7f0c

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/googleforgames/agones.git pull/3529/head:pr_3529 && git checkout pr_3529
  • helm install agones ./install/helm/agones --namespace agones-system --set agones.image.registry=us-docker.pkg.dev/agones-images/ci --set agones.image.tag=1.37.0-dev-2a61f83-amd64

Copy link
Collaborator

@igooch igooch left a comment

Choose a reason for hiding this comment

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

A few minor nits then it looks good!

# When bufferSize in percentage format is used, minCapacity should be set and more than 0.
# MinCapacity is the minimum aggregate Counter total capacity across the fleet.
# If BufferSize is specified as a percentage, MinCapacity is required and cannot be 0.
# If non zero, MinCapacity must be smaller than MaxCapacity and it can be greater than or equal to BufferSize.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
# If non zero, MinCapacity must be smaller than MaxCapacity and it can be greater than or equal to BufferSize.
# If non zero, MinCapacity must be smaller than MaxCapacity and must be greater than or equal to BufferSize.

Comment on lines +43 to +44
# If zero, it is ignored.
# If non zero, it must be smaller than MaxCapacity and can be greater than or equal to BufferSize.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
# If zero, it is ignored.
# If non zero, it must be smaller than MaxCapacity and can be greater than or equal to BufferSize.
# If BufferSize is specified as a percentage, MinCapacity is required must be greater than 0.
# If non zero, MinCapacity must be smaller than MaxCapacity and must be greater than or equal to BufferSize.

bufferSize: 5
# MinCapacity is the minimum aggregate Counter total capacity across the fleet.
# If BufferSize is specified as a percentage, MinCapacity is required and cannot be 0.
# If non zero, MinCapacity must be smaller than MaxCapacity and it can be greater than or equal to BufferSize.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
# If non zero, MinCapacity must be smaller than MaxCapacity and it can be greater than or equal to BufferSize.
# If non zero, MinCapacity must be smaller than MaxCapacity and must be greater than or equal to BufferSize.

Comment on lines +130 to +131
# If zero, it is ignored.
# If non zero, it must be smaller than MaxCapacity and can be greater than or equal to BufferSize.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
# If zero, it is ignored.
# If non zero, it must be smaller than MaxCapacity and can be greater than or equal to BufferSize.
# If BufferSize is specified as a percentage, MinCapacity is required must be greater than 0.
# If non zero, MinCapacity must be smaller than MaxCapacity and must be greater than or equal to BufferSize.

@@ -61,6 +224,31 @@ spec:
mode: deathmatch
annotations:
map: garden22
# [Stage:Alpha]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
# [Stage:Alpha]
# [Stage:Alpha]

@Kalaiselvi84
Copy link
Contributor Author

I have made changes based on your suggestion, Ivy.

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 5a674c54-ffe3-4b62-a19b-699d6646e1d3

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/googleforgames/agones.git pull/3529/head:pr_3529 && git checkout pr_3529
  • helm install agones ./install/helm/agones --namespace agones-system --set agones.image.registry=us-docker.pkg.dev/agones-images/ci --set agones.image.tag=1.37.0-dev-c34ecbb-amd64

@Kalaiselvi84
Copy link
Contributor Author

Kalaiselvi84 commented Dec 18, 2023

@gongmax please hold on, the last commit is still in processing

@Kalaiselvi84
Copy link
Contributor Author

Will close this PR since it is being handled in #3552

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature New features for Agones size/L size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants