From f306a3f357d6cfed04747d27d908ead638a829ec Mon Sep 17 00:00:00 2001 From: Kalaiselvim <117940852+Kalaiselvi84@users.noreply.github.com> Date: Tue, 23 Apr 2024 18:36:52 +0000 Subject: [PATCH] Release v1.40.0 (#3799) * Release v1.40.0 * align release blog * highlight memory usage * include memory optimization in release blog and modify Changelog --- CHANGELOG.md | 67 ++ install/helm/agones/Chart.yaml | 4 +- install/helm/agones/values.yaml | 2 +- install/yaml/install.yaml | 72 +- sdks/csharp/sdk/AgonesSDK.nuspec | 2 +- sdks/csharp/sdk/csharp-sdk.csproj | 2 +- sdks/nodejs/package-lock.json | 4 +- sdks/nodejs/package.json | 2 +- sdks/rust/Cargo.toml | 2 +- sdks/unity/package.json | 2 +- site/config.toml | 16 +- site/content/en/blog/releases/1.39.0.md | 8 +- site/content/en/blog/releases/1.40.0.md | 76 ++ .../en/docs/Guides/Client SDKs/csharp.md | 775 +++++++++--------- .../en/docs/Guides/counters-and-lists.md | 13 +- site/content/en/docs/Guides/feature-stages.md | 14 - site/content/en/docs/Guides/fleet-updates.md | 3 - site/content/en/docs/Installation/_index.md | 3 +- site/content/en/docs/Reference/fleet.md | 83 -- site/layouts/partials/navbar.html | 2 +- 20 files changed, 573 insertions(+), 579 deletions(-) create mode 100644 site/content/en/blog/releases/1.40.0.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 843f390bd7..e34adb96f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,72 @@ # Changelog +## [v1.40.0](https://github.com/googleforgames/agones/tree/v1.40.0) (2024-04-23) + +[Full Changelog](https://github.com/googleforgames/agones/compare/v1.39.0...v1.40.0) + +**Breaking changes:** +- Counters and Lists: Remove Bool Returns by @Kalaiselvi84 in https://github.com/googleforgames/agones/pull/3738 + +**Implemented enhancements:** +- Leader Election in Custom Controller by @Kalaiselvi84 in https://github.com/googleforgames/agones/pull/3696 +- Migrating from generate-groups.sh to kube_codegen.sh by @Kalaiselvi84 in https://github.com/googleforgames/agones/pull/3722 +- Move GKEAutopilotExtendedDurationPods to Alpha in 1.28+ by @zmerlynn in https://github.com/googleforgames/agones/pull/3729 +- Move DisableResyncOnSDKServer to Beta by @Kalaiselvi84 in https://github.com/googleforgames/agones/pull/3732 +- Counters & Lists landing page and doc improvements by @markmandel in https://github.com/googleforgames/agones/pull/3649 +- Graduate FleetAllocationOverflow to Stable by @Kalaiselvi84 in https://github.com/googleforgames/agones/pull/3733 +- Adds Counters and Lists to CSharp SDK by @igooch in https://github.com/googleforgames/agones/pull/3581 +- Feat/counter and list defaulting order to ascending by @lacroixthomas in https://github.com/googleforgames/agones/pull/3734 +- Add handling for StatusAddresses in GameServerStatus for the Unity SDK by @charlesvien in https://github.com/googleforgames/agones/pull/3739 +- Feat(gameservers): Shared pod IPs with GameServer Addresses by @lacroixthomas in https://github.com/googleforgames/agones/pull/3764 +- Be prescriptive about rotating regions when updating Kubernetes versions by @zmerlynn in https://github.com/googleforgames/agones/pull/3716 +- Fix ensure-e2e-infra-state-bucket by @zmerlynn in https://github.com/googleforgames/agones/pull/3719 +- Create Performance Cluster 1.28 by @Kalaiselvi84 in https://github.com/googleforgames/agones/pull/3720 +- Optimise GameServer Sub-Controller Queues by @markmandel in https://github.com/googleforgames/agones/pull/3781 + +**Fixed bugs:** +- Counters & Lists: Consolidate `priorities` sorting by @markmandel in https://github.com/googleforgames/agones/pull/3690 +- Fix(Counter & Lists): Add validation for `priorities` by @lacroixthomas in https://github.com/googleforgames/agones/pull/3714 +- fix: #3607 Metrics data loss in K8S controller by @alvin-7 in https://github.com/googleforgames/agones/pull/3692 +- Deflake GameServerAllocationDuringMultipleAllocationClients by allowing errors by @Kalaiselvi84 in https://github.com/googleforgames/agones/pull/3750 + +**Security fixes:** +- Bump protobufjs from 7.2.4 to 7.2.6 in /sdks/nodejs by @dependabot in https://github.com/googleforgames/agones/pull/3755 +- Bump golang.org/x/net from 0.19.0 to 0.23.0 by @zmerlynn in https://github.com/googleforgames/agones/pull/3793 + +**Other:** +- Flaky: TestGameServerCreationAfterDeletingOneExtensionsPod by @markmandel in https://github.com/googleforgames/agones/pull/3699 +- Prep for release v1.40.0 by @Kalaiselvi84 in https://github.com/googleforgames/agones/pull/3700 +- Bumps cpp-simple Image and Refactoring Example Makefiles by @Kalaiselvi84 in https://github.com/googleforgames/agones/pull/3695 +- Upgrade Protobuf to 1.33.0 by @Kalaiselvi84 in https://github.com/googleforgames/agones/pull/3711 +- Modify Script for Makefile Version Updates in Examples Directory by @Kalaiselvi84 in https://github.com/googleforgames/agones/pull/3712 +- Adds simple genai server example documentation to the Agones site by @igooch in https://github.com/googleforgames/agones/pull/3713 +- Update Supported Kubernetes to 1.27, 1.28, 1.29 by @Kalaiselvi84 in https://github.com/googleforgames/agones/pull/3654 +- fix: typo in docs by @qhyun2 in https://github.com/googleforgames/agones/pull/3723 +- Tweak: Setting up the Game Server by @Kalaiselvi84 in https://github.com/googleforgames/agones/pull/3717 +- Docs: gke.md - spelling by @daniellee in https://github.com/googleforgames/agones/pull/3740 +- Aesthetic rearrangement of cloudbuild.yaml by @zmerlynn in https://github.com/googleforgames/agones/pull/3741 +- Docs: Make hitting on connection explicit by @markmandel in https://github.com/googleforgames/agones/pull/3743 +- CI: Don't check Unreal Link by @markmandel in https://github.com/googleforgames/agones/pull/3745 +- New recommendation for multi-cluster allocation by @markmandel in https://github.com/googleforgames/agones/pull/3744 +- Custom Controller Example Page on Agones Website by @Kalaiselvi84 in https://github.com/googleforgames/agones/pull/3725 +- Add Nitrado logo by @towolf in https://github.com/googleforgames/agones/pull/3753 +- Remove unnecessary args from e2e-test-cloudbuild by @zmerlynn in https://github.com/googleforgames/agones/pull/3754 +- Update Allocation from Fleet Documentation by @Kalaiselvi84 in https://github.com/googleforgames/agones/pull/3761 +- Transform Lint Warnings into Errors by @Kalaiselvi84 in https://github.com/googleforgames/agones/pull/3756 +- Update Canary Testing Documentation by @Kalaiselvi84 in https://github.com/googleforgames/agones/pull/3760 +- Supertuxkart Example on Agones Site by @Kalaiselvi84 in https://github.com/googleforgames/agones/pull/3728 +- Xonotic Example on Agones Site by @Kalaiselvi84 in https://github.com/googleforgames/agones/pull/3742 +- nit documentation fix in kind cluster section when building Agones by @vicentefb in https://github.com/googleforgames/agones/pull/3770 +- Merged steps inside documentation about webhook certificate creation by @vicentefb in https://github.com/googleforgames/agones/pull/3768 +- Example Images: Increment Tags by @Kalaiselvi84 in https://github.com/googleforgames/agones/pull/3796 +- Update simple game server example documentation by @vicentefb in https://github.com/googleforgames/agones/pull/3776 + +**New Contributors:** +- @lacroixthomas made their first contribution in https://github.com/googleforgames/agones/pull/3714 +- @daniellee made their first contribution in https://github.com/googleforgames/agones/pull/3740 +- @charlesvien made their first contribution in https://github.com/googleforgames/agones/pull/3739 +- @vicentefb made their first contribution in https://github.com/googleforgames/agones/pull/3770 + ## [v1.39.0](https://github.com/googleforgames/agones/tree/v1.39.0) (2024-03-12) [Full Changelog](https://github.com/googleforgames/agones/compare/v1.38.0...v1.39.0) diff --git a/install/helm/agones/Chart.yaml b/install/helm/agones/Chart.yaml index d168b4ee43..0969c47110 100644 --- a/install/helm/agones/Chart.yaml +++ b/install/helm/agones/Chart.yaml @@ -15,8 +15,8 @@ # Declare variables to be passed into your templates. apiVersion: v1 -appVersion: "1.40.0-dev" -version: 1.40.0-dev +appVersion: "1.40.0" +version: 1.40.0 name: agones description: a library for hosting, running and scaling dedicated game servers on Kubernetes. keywords: diff --git a/install/helm/agones/values.yaml b/install/helm/agones/values.yaml index 281c6d5509..24eb60860e 100644 --- a/install/helm/agones/values.yaml +++ b/install/helm/agones/values.yaml @@ -254,7 +254,7 @@ agones: topologySpreadConstraints: {} image: registry: us-docker.pkg.dev/agones-images/release - tag: 1.40.0-dev + tag: 1.40.0 controller: name: agones-controller pullPolicy: IfNotPresent diff --git a/install/yaml/install.yaml b/install/yaml/install.yaml index aa7cc71250..4140f076bb 100644 --- a/install/yaml/install.yaml +++ b/install/yaml/install.yaml @@ -50,7 +50,7 @@ metadata: namespace: agones-system labels: app: agones - chart: agones-1.40.0-dev + chart: agones-1.40.0 release: agones-manual heritage: Helm --- @@ -75,7 +75,7 @@ metadata: namespace: agones-system labels: app: agones - chart: agones-1.40.0-dev + chart: agones-1.40.0 release: agones-manual heritage: Helm --- @@ -100,7 +100,7 @@ metadata: namespace: default labels: app: agones - chart: agones-1.40.0-dev + chart: agones-1.40.0 release: agones-manual heritage: Helm --- @@ -112,7 +112,7 @@ metadata: namespace: agones-system labels: app: agones - chart: "agones-1.40.0-dev" + chart: "agones-1.40.0" release: "agones-manual" heritage: "Helm" type: Opaque @@ -129,7 +129,7 @@ metadata: namespace: agones-system labels: app: agones - chart: "agones-1.40.0-dev" + chart: "agones-1.40.0" release: "agones-manual" heritage: "Helm" data: @@ -145,7 +145,7 @@ metadata: namespace: agones-system labels: app: agones - chart: "agones-1.40.0-dev" + chart: "agones-1.40.0" release: "agones-manual" heritage: "Helm" data: @@ -161,7 +161,7 @@ metadata: namespace: agones-system labels: app: agones - chart: "agones-1.40.0-dev" + chart: "agones-1.40.0" release: "agones-manual" heritage: "Helm" data: @@ -191,7 +191,7 @@ metadata: labels: component: crd app: agones - chart: agones-1.40.0-dev + chart: agones-1.40.0 release: agones-manual heritage: Helm spec: @@ -5634,7 +5634,7 @@ metadata: labels: component: crd app: agones - chart: agones-1.40.0-dev + chart: agones-1.40.0 release: agones-manual heritage: Helm spec: @@ -5824,7 +5824,7 @@ metadata: labels: component: crd app: agones - chart: agones-1.40.0-dev + chart: agones-1.40.0 release: agones-manual heritage: Helm spec: @@ -11099,7 +11099,7 @@ metadata: labels: component: crd app: agones - chart: agones-1.40.0-dev + chart: agones-1.40.0 release: agones-manual heritage: Helm name: gameserverallocationpolicies.multicluster.agones.dev @@ -11178,7 +11178,7 @@ metadata: labels: component: crd app: agones - chart: agones-1.40.0-dev + chart: agones-1.40.0 release: agones-manual heritage: Helm spec: @@ -16589,7 +16589,7 @@ metadata: name: agones-allocator labels: app: agones - chart: agones-1.40.0-dev + chart: agones-1.40.0 release: agones-manual heritage: Helm rules: @@ -16619,7 +16619,7 @@ metadata: name: agones-controller labels: app: agones - chart: agones-1.40.0-dev + chart: agones-1.40.0 release: agones-manual heritage: Helm rules: @@ -16673,7 +16673,7 @@ metadata: name: agones-sdk labels: app: agones - chart: agones-1.40.0-dev + chart: agones-1.40.0 release: agones-manual heritage: Helm rules: @@ -16692,7 +16692,7 @@ metadata: name: agones-allocator labels: app: agones - chart: agones-1.40.0-dev + chart: agones-1.40.0 release: agones-manual heritage: Helm subjects: @@ -16711,7 +16711,7 @@ metadata: name: agones-controller-access labels: app: agones - chart: agones-1.40.0-dev + chart: agones-1.40.0 release: agones-manual heritage: Helm subjects: @@ -16763,7 +16763,7 @@ metadata: namespace: default labels: app: agones - chart: agones-1.40.0-dev + chart: agones-1.40.0 release: agones-manual heritage: Helm subjects: @@ -16797,7 +16797,7 @@ metadata: labels: agones.dev/role: controller app: agones - chart: agones-1.40.0-dev + chart: agones-1.40.0 release: agones-manual heritage: Helm spec: @@ -16831,7 +16831,7 @@ metadata: labels: agones.dev/role: extensions app: agones - chart: agones-1.40.0-dev + chart: agones-1.40.0 release: agones-manual heritage: Helm spec: @@ -16851,7 +16851,7 @@ metadata: labels: component: ping app: agones - chart: agones-1.40.0-dev + chart: agones-1.40.0 release: agones-manual heritage: Helm spec: @@ -16873,7 +16873,7 @@ metadata: labels: component: ping app: agones - chart: agones-1.40.0-dev + chart: agones-1.40.0 release: agones-manual heritage: Helm spec: @@ -16909,7 +16909,7 @@ metadata: labels: agones.dev/role: extensions app: agones - chart: agones-1.40.0-dev + chart: agones-1.40.0 release: agones-manual heritage: Helm spec: @@ -16946,7 +16946,7 @@ metadata: labels: component: allocator app: agones - chart: agones-1.40.0-dev + chart: agones-1.40.0 release: agones-manual heritage: Helm spec: @@ -16968,7 +16968,7 @@ metadata: labels: multicluster.agones.dev/role: allocator app: agones - chart: agones-1.40.0-dev + chart: agones-1.40.0 release: agones-manual heritage: Helm spec: @@ -17002,7 +17002,7 @@ metadata: labels: component: controller app: agones - chart: agones-1.40.0-dev + chart: agones-1.40.0 release: agones-manual heritage: Helm spec: @@ -17044,7 +17044,7 @@ spec: serviceAccountName: agones-controller containers: - name: agones-controller - image: "us-docker.pkg.dev/agones-images/release/agones-controller:1.40.0-dev" + image: "us-docker.pkg.dev/agones-images/release/agones-controller:1.40.0" imagePullPolicy: IfNotPresent env: # minimum port that can be exposed to GameServer traffic @@ -17054,7 +17054,7 @@ spec: - name: MAX_PORT value: "8000" - name: SIDECAR_IMAGE # overwrite the GameServer sidecar image that is used - value: "us-docker.pkg.dev/agones-images/release/agones-sdk:1.40.0-dev" + value: "us-docker.pkg.dev/agones-images/release/agones-sdk:1.40.0" - name: ALWAYS_PULL_SIDECAR # set the sidecar imagePullPolicy to Always value: "false" - name: SIDECAR_CPU_REQUEST @@ -17160,7 +17160,7 @@ metadata: labels: component: extensions app: agones - chart: agones-1.40.0-dev + chart: agones-1.40.0 release: agones-manual heritage: Helm spec: @@ -17204,7 +17204,7 @@ spec: terminationGracePeriodSeconds: 27 containers: - name: agones-extensions - image: "us-docker.pkg.dev/agones-images/release/agones-extensions:1.40.0-dev" + image: "us-docker.pkg.dev/agones-images/release/agones-extensions:1.40.0" imagePullPolicy: IfNotPresent env: - name: PROMETHEUS_EXPORTER @@ -17306,7 +17306,7 @@ metadata: labels: component: ping app: agones - chart: agones-1.40.0-dev + chart: agones-1.40.0 release: agones-manual heritage: Helm spec: @@ -17341,7 +17341,7 @@ spec: priorityClassName: agones-system containers: - name: agones-ping - image: "us-docker.pkg.dev/agones-images/release/agones-ping:1.40.0-dev" + image: "us-docker.pkg.dev/agones-images/release/agones-ping:1.40.0" imagePullPolicy: IfNotPresent livenessProbe: httpGet: @@ -17415,7 +17415,7 @@ spec: secretName: allocator-client-ca containers: - name: agones-allocator - image: "us-docker.pkg.dev/agones-images/release/agones-allocator:1.40.0-dev" + image: "us-docker.pkg.dev/agones-images/release/agones-allocator:1.40.0" imagePullPolicy: IfNotPresent livenessProbe: httpGet: @@ -17496,7 +17496,7 @@ metadata: labels: component: controller app: agones - chart: agones-1.40.0-dev + chart: agones-1.40.0 release: agones-manual heritage: Helm spec: @@ -17547,7 +17547,7 @@ metadata: labels: component: controller app: agones - chart: agones-1.40.0-dev + chart: agones-1.40.0 release: agones-manual heritage: Helm webhooks: @@ -17599,7 +17599,7 @@ metadata: labels: component: controller app: agones - chart: agones-1.40.0-dev + chart: agones-1.40.0 release: agones-manual heritage: Helm webhooks: diff --git a/sdks/csharp/sdk/AgonesSDK.nuspec b/sdks/csharp/sdk/AgonesSDK.nuspec index 1def4a710e..4754d1dbed 100644 --- a/sdks/csharp/sdk/AgonesSDK.nuspec +++ b/sdks/csharp/sdk/AgonesSDK.nuspec @@ -2,7 +2,7 @@ AgonesSDK - 1.40.0-dev + 1.40.0 Google LLC Google LLC false diff --git a/sdks/csharp/sdk/csharp-sdk.csproj b/sdks/csharp/sdk/csharp-sdk.csproj index faab66aa88..1559358c24 100644 --- a/sdks/csharp/sdk/csharp-sdk.csproj +++ b/sdks/csharp/sdk/csharp-sdk.csproj @@ -13,7 +13,7 @@ https://agones.dev http://www.apache.org/licenses/LICENSE-2.0 AgonesSDK - 1.40.0-dev + 1.40.0 agones, googleforgames, kuberenetes, multiplayer, gameservers agones.dev Debug;Release;DebugProtoGen diff --git a/sdks/nodejs/package-lock.json b/sdks/nodejs/package-lock.json index 22b0f04222..5bbdeb63a1 100644 --- a/sdks/nodejs/package-lock.json +++ b/sdks/nodejs/package-lock.json @@ -1,12 +1,12 @@ { "name": "@google-cloud/agones-sdk", - "version": "1.40.0-dev", + "version": "1.40.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@google-cloud/agones-sdk", - "version": "1.40.0-dev", + "version": "1.40.0", "license": "Apache-2.0", "dependencies": { "@grpc/grpc-js": "1.7.3", diff --git a/sdks/nodejs/package.json b/sdks/nodejs/package.json index 61f62112a5..9f7aa7f3ba 100644 --- a/sdks/nodejs/package.json +++ b/sdks/nodejs/package.json @@ -26,5 +26,5 @@ "publishConfig": { "access": "public" }, - "version": "1.40.0-dev" + "version": "1.40.0" } diff --git a/sdks/rust/Cargo.toml b/sdks/rust/Cargo.toml index 635eb30a00..b26ab4fa96 100644 --- a/sdks/rust/Cargo.toml +++ b/sdks/rust/Cargo.toml @@ -14,7 +14,7 @@ [package] name = "agones" -version = "1.40.0-dev" +version = "1.40.0" edition = "2021" description = "The Rust SDK for Agones." license = "Apache-2.0" diff --git a/sdks/unity/package.json b/sdks/unity/package.json index 89ce9d676e..c14835c0ff 100644 --- a/sdks/unity/package.json +++ b/sdks/unity/package.json @@ -1,6 +1,6 @@ { "name": "com.googleforgames.agones", - "version": "1.40.0-dev", + "version": "1.40.0", "displayName": "Agones Unity SDK", "description": "The Unity Gameserver SDK for Agones", "unity": "2019.1", diff --git a/site/config.toml b/site/config.toml index 1cd4f17200..3be082d4b6 100644 --- a/site/config.toml +++ b/site/config.toml @@ -80,17 +80,17 @@ github_repo = "https://github.com/googleforgames/agones" gcs_engine_id = "016691298986124624340:x7qv2dywdao" # current release branch. Never is rc. -release_branch = "release-1.39.0" +release_branch = "release-1.40.0" # the main version. Never is rc. -release_version = "1.39.0" +release_version = "1.40.0" # shown for production -supported_k8s = ["1.26", "1.27", "1.28"] -k8s_api_version = "1.27" -gke_example_cluster_version = "1.27" -aks_example_cluster_version = "1.28.0" -eks_example_cluster_version = "1.28" -minikube_example_cluster_version = "1.27.6" +supported_k8s = ["1.27", "1.28", "1.29"] +k8s_api_version = "1.28" +gke_example_cluster_version = "1.28" +aks_example_cluster_version = "1.28" +eks_example_cluster_version = "1.29" +minikube_example_cluster_version = "1.28.6" # shown in development (or the next versions that will be supported) dev_supported_k8s = ["1.27", "1.28", "1.29"] dev_k8s_api_version = "1.28" diff --git a/site/content/en/blog/releases/1.39.0.md b/site/content/en/blog/releases/1.39.0.md index 7bd358f19c..8d8325d848 100644 --- a/site/content/en/blog/releases/1.39.0.md +++ b/site/content/en/blog/releases/1.39.0.md @@ -17,7 +17,7 @@ In this release, we’ve made some important changes and introduced exciting new **Key highlights of this release include:** -- **GenAI and Agones**: We've added a new example GenAI game server that shows how to integrate Generative AI backends into your Agones game server. +- **GenAI and Agones**: We've added a new example GenAI game server that shows how to integrate Generative AI backends into your Agones game server. - **Counters and Lists Allocation Results**: GameServer Allocation results now also return the current state of Counter and List values on the allocated GameServer, making workflows based on these values much easier. @@ -25,7 +25,7 @@ In this release, we’ve made some important changes and introduced exciting new - **New Example Custom GameServer Controller**: See how to implement your own custom controller with Agones resources with only a small amount of code. -Check the README for details on features, installation and usage. +Check the README for details on features, installation and usage. **Breaking changes:** - Breaking: Remove Cmake gRPC install when not found by @markmandel in https://github.com/googleforgames/agones/pull/3621 @@ -39,7 +39,7 @@ Check the CHANGELOG for more details on changes. +See CHANGELOG for more details on changes. Images available with this release: @@ -60,7 +60,7 @@ Images available with this release: Helm chart available with this release: -- +- helm install agones agones/agones --version 1.39.0 > Make sure to add our stable helm repository using `helm repo add agones https://agones.dev/chart/stable` \ No newline at end of file diff --git a/site/content/en/blog/releases/1.40.0.md b/site/content/en/blog/releases/1.40.0.md new file mode 100644 index 0000000000..51c639b40b --- /dev/null +++ b/site/content/en/blog/releases/1.40.0.md @@ -0,0 +1,76 @@ +--- +title: "1.40.0 - Kubernetes 1.29.0, CSharp SDK for Counters and Lists, and Multiple Feature Promotions" +linktitle: "1.40.0" +date: "2024-04-23" +--- + +This is the 1.40.0 release of Agones. + +In this release, we’ve updated our Kuberenetes support to include version 1.29, introduced a new implementation in the CSharp SDK for the Counters and Lists, graduated the FleetAllocationOverflow feature to stable, moved the DisableResyncOnSDKServer feature into beta and refined the documentation for Counters and Lists to simplify usage and enhance clarity. + +- **Kubernetes Support Update 1.29**: We’ve upgraded our Kubernetes compatibility to include version 1.29 and have discontinued support for version 1.26. Our current supported versions are now 1.27, 1.28, and 1.29. Please ensure your clusters are upgraded to one of these supported versions. + +- **CSharp SDK for Counters and Lists**: We’ve rolled out a new implementation in the CSharp SDK for the Counters and Lists features, along with significant enhancements to the documentation. These updates simplify the process of tracking numeric counters and lists of values on GameServers, providing clearer guidance. + +- **Support for Extended Duration Pods on GKE Autopilot**: Starting with Kubernetes version 1.28, we now support extended duration pods in Agones on GKE Autopilot. The GKEAutopilotExtendedDurationPods feature has been moved to Alpha status and requires Kubernetes versions 1.28 or newer. This enhancement is essential for those needing longer-lived pods in managed Kubernetes environments. + +- **DisableResyncOnSDKServer in Beta**: The DisableResyncOnSDKServer feature has progressed to beta in this release and is now enabled by default. This feature sets the resync interval to 0 to enhance performance by eliminating unnecessary resyncs. + +- **FleetAllocationOverflow now Stable**: With the FleetAllocationOverflow feature now stable in this release, you can apply labels and/or annotations to GameServers that exceed the desired number of replicas in a GameServerSet. This occurs when the allocation of GameServers surpasses the specified replica count. + +- **Unity SDK Update: Enhanced Address Retrieval for GameServers**: We've enhanced functionality to allow developers to conveniently access all associated addresses, including both IP and DNS, for a game server. This change simplifies the integration and deployment process by providing complete address information. + +- **Counters & Lists Documentation Enhancements**: We've standardized sorting priorities in GameServerAllocation and Fleet to consistently use available capacity and set the default sorting order as Ascending, making it easier to understand. We also have a new Counters and Lists [documentation landing page](https://agones.dev/site/docs/guides/counters-and-lists/) to explain the functionality in full. + +- **Optimised GameServer Sub-Controller Queues**: We noticed that parts of the Agones contoller were queuing _way_ too many items than they should, resulting in consuming more memory than was ideal. This fixes that, ensuring that _far_ fewer records get queued, resulting in a leaner memory footprint from the controller. + +Check the README for details on features, installation and usage. + +**Breaking changes:** +- Counters and Lists: Remove Bool Returns by @Kalaiselvi84 in https://github.com/googleforgames/agones/pull/3738 + +**Implemented enhancements:** +- Leader Election in Custom Controller by @Kalaiselvi84 in https://github.com/googleforgames/agones/pull/3696 +- Migrating from generate-groups.sh to kube_codegen.sh by @Kalaiselvi84 in https://github.com/googleforgames/agones/pull/3722 +- Move GKEAutopilotExtendedDurationPods to Alpha in 1.28+ by @zmerlynn in https://github.com/googleforgames/agones/pull/3729 +- Move DisableResyncOnSDKServer to Beta by @Kalaiselvi84 in https://github.com/googleforgames/agones/pull/3732 +- Counters & Lists landing page and doc improvements by @markmandel in https://github.com/googleforgames/agones/pull/3649 +- Graduate FleetAllocationOverflow to Stable by @Kalaiselvi84 in https://github.com/googleforgames/agones/pull/3733 +- Adds Counters and Lists to CSharp SDK by @igooch in https://github.com/googleforgames/agones/pull/3581 +- Feat/counter and list defaulting order to ascending by @lacroixthomas in https://github.com/googleforgames/agones/pull/3734 +- Add handling for StatusAddresses in GameServerStatus for the Unity SDK by @charlesvien in https://github.com/googleforgames/agones/pull/3739 +- Feat(gameservers): Shared pod IPs with GameServer Addresses by @lacroixthomas in https://github.com/googleforgames/agones/pull/3764 +- Be prescriptive about rotating regions when updating Kubernetes versions by @zmerlynn in https://github.com/googleforgames/agones/pull/3716 +- Fix ensure-e2e-infra-state-bucket by @zmerlynn in https://github.com/googleforgames/agones/pull/3719 +- Create Performance Cluster 1.28 by @Kalaiselvi84 in https://github.com/googleforgames/agones/pull/3720 +- Optimise GameServer Sub-Controller Queues by @markmandel in https://github.com/googleforgames/agones/pull/3781 + +**Security fixes:** +- Bump protobufjs from 7.2.4 to 7.2.6 in /sdks/nodejs by @dependabot in https://github.com/googleforgames/agones/pull/3755 +- Bump golang.org/x/net from 0.19.0 to 0.23.0 by @zmerlynn in https://github.com/googleforgames/agones/pull/3793 + +See CHANGELOG for more details on changes. + +Images available with this release: + +- [us-docker.pkg.dev/agones-images/release/agones-controller:1.40.0](https://us-docker.pkg.dev/agones-images/release/agones-controller:1.40.0) +- [us-docker.pkg.dev/agones-images/release/agones-sdk:1.40.0](https://us-docker.pkg.dev/agones-images/release/agones-sdk:1.40.0) +- [us-docker.pkg.dev/agones-images/release/agones-ping:1.40.0](https://us-docker.pkg.dev/agones-images/release/agones-ping:1.40.0) +- [us-docker.pkg.dev/agones-images/release/agones-allocator:1.40.0](https://us-docker.pkg.dev/agones-images/release/agones-allocator:1.40.0) +- [us-docker.pkg.dev/agones-images/examples/allocation-endpoint-proxy:0.8](https://us-docker.pkg.dev/agones-images/examples/allocation-endpoint-proxy:0.8) +- [us-docker.pkg.dev/agones-images/examples/autoscaler-webhook:0.13](https://us-docker.pkg.dev/agones-images/examples/autoscaler-webhook:0.13) +- [us-docker.pkg.dev/agones-images/examples/cpp-simple-server:0.17](https://us-docker.pkg.dev/agones-images/examples/cpp-simple-server:0.17) +- [us-docker.pkg.dev/agones-images/examples/crd-client:0.16](https://us-docker.pkg.dev/agones-images/examples/crd-client:0.16) +- [us-docker.pkg.dev/agones-images/examples/nodejs-simple-server:0.10](https://us-docker.pkg.dev/agones-images/examples/nodejs-simple-server:0.10) +- [us-docker.pkg.dev/agones-images/examples/rust-simple-server:0.13](https://us-docker.pkg.dev/agones-images/examples/rust-simple-server:0.13) +- [us-docker.pkg.dev/agones-images/examples/simple-game-server:0.31](https://us-docker.pkg.dev/agones-images/examples/simple-game-server:0.31) +- [us-docker.pkg.dev/agones-images/examples/supertuxkart-example:0.13](https://us-docker.pkg.dev/agones-images/examples/supertuxkart-example:0.13) +- [us-docker.pkg.dev/agones-images/examples/unity-simple-server:0.3](https://us-docker.pkg.dev/agones-images/examples/unity-simple-server:0.3) +- [us-docker.pkg.dev/agones-images/examples/xonotic-example:1.9](https://us-docker.pkg.dev/agones-images/examples/xonotic-example:1.9) + +Helm chart available with this release: + +- + helm install agones agones/agones --version 1.40.0 + +> Make sure to add our stable helm repository using `helm repo add agones https://agones.dev/chart/stable` \ No newline at end of file diff --git a/site/content/en/docs/Guides/Client SDKs/csharp.md b/site/content/en/docs/Guides/Client SDKs/csharp.md index dfffcea53b..53b0b09485 100644 --- a/site/content/en/docs/Guides/Client SDKs/csharp.md +++ b/site/content/en/docs/Guides/Client SDKs/csharp.md @@ -1,407 +1,368 @@ ---- -title: "C# Game Server Client SDK" -linkTitle: "C#" -date: 2020-2-25 -weight: 50 -description: "This is the C# version of the Agones Game Server Client SDK." -publishDate: 2020-05-28 ---- - -Check the [Client SDK Documentation]({{< relref "_index.md" >}}) for more details on each of the SDK functions and how to run the SDK locally. - - -## SDK Functionality - -{{% feature expiryVersion="1.40.0" %}} - -| Area | Action | Implemented | -|-----------------|---------------------|-------------| -| Lifecycle | Ready | ✔️ | -| Lifecycle | Health | ✔️ | -| Lifecycle | Reserve | ✔️ | -| Lifecycle | Allocate | ✔️ | -| Lifecycle | Shutdown | ✔️ | -| Configuration | GetGameServer | ✔️ | -| Configuration | WatchGameServer | ✔️ | -| Metadata | SetAnnotation | ✔️ | -| Metadata | SetLabel | ✔️ | -| Counters | GetCounterCount | ❌ | -| Counters | SetCounterCount | ❌ | -| Counters | IncrementCounter | ❌ | -| Counters | DecrementCounter | ❌ | -| Counters | SetCounterCapacity | ❌ | -| Counters | GetCounterCapacity | ❌ | -| Lists | AppendListValue | ❌ | -| Lists | DeleteListValue | ❌ | -| Lists | SetListCapacity | ❌ | -| Lists | GetListCapacity | ❌ | -| Lists | ListContains | ❌ | -| Lists | GetListLength | ❌ | -| Lists | GetListValues | ❌ | -| Player Tracking | GetConnectedPlayers | ✔️ | -| Player Tracking | GetPlayerCapacity | ✔️ | -| Player Tracking | GetPlayerCount | ✔️ | -| Player Tracking | IsPlayerConnected | ✔️ | -| Player Tracking | PlayerConnect | ✔️ | -| Player Tracking | PlayerDisconnect | ✔️ | -| Player Tracking | SetPlayerCapacity | ✔️ | - -{{% /feature %}} -{{% feature publishVersion="1.40.0" %}} - -| Area | Action | Implemented | -|-----------------|---------------------|-------------| -| Lifecycle | Ready | ✔️ | -| Lifecycle | Health | ✔️ | -| Lifecycle | Reserve | ✔️ | -| Lifecycle | Allocate | ✔️ | -| Lifecycle | Shutdown | ✔️ | -| Configuration | GetGameServer | ✔️ | -| Configuration | WatchGameServer | ✔️ | -| Metadata | SetAnnotation | ✔️ | -| Metadata | SetLabel | ✔️ | -| Counters | GetCounterCount | ✔️ | -| Counters | SetCounterCount | ✔️ | -| Counters | IncrementCounter | ✔️ | -| Counters | DecrementCounter | ✔️ | -| Counters | SetCounterCapacity | ✔️ | -| Counters | GetCounterCapacity | ✔️ | -| Lists | AppendListValue | ✔️ | -| Lists | DeleteListValue | ✔️ | -| Lists | SetListCapacity | ✔️ | -| Lists | GetListCapacity | ✔️ | -| Lists | ListContains | ✔️ | -| Lists | GetListLength | ✔️ | -| Lists | GetListValues | ✔️ | -| Player Tracking | GetConnectedPlayers | ✔️ | -| Player Tracking | GetPlayerCapacity | ✔️ | -| Player Tracking | GetPlayerCount | ✔️ | -| Player Tracking | IsPlayerConnected | ✔️ | -| Player Tracking | PlayerConnect | ✔️ | -| Player Tracking | PlayerDisconnect | ✔️ | -| Player Tracking | SetPlayerCapacity | ✔️ | - -{{% /feature %}} - -## Download - -Download the source {{< ghlink href="sdks/csharp" >}}directly from GitHub{{< /ghlink >}}. - -## Install using NuGet - -- Download the nuget package [directly](https://www.nuget.org/packages/AgonesSDK/) -- Install the latest version using the Package Manager: `Install-Package AgonesSDK` -- Install the latest version using the .NET CLI: `dotnet add package AgonesSDK` - -To select a specific version, append `--version`, for example: `--version 1.8.0` to either commands. - -## Prerequisites - -- .Net Standard 2.0 compliant framework. - -## Usage - -Reference the SDK in your project & create a new instance of the SDK wrapper: - -### Initialization - -To use the AgonesSDK, you will need to import the namespace by adding `using Agones;` at the beginning of your relevant files. - -```csharp -var agones = new AgonesSDK(); -``` - -### Connection - -To connect to the SDK server, either locally or when running on Agones, run the `ConnectAsync()` method. -This will wait for up to 30 seconds if the SDK server has not yet started and the connection cannot be made, -and will return `false` if there was an issue connecting. - -```csharp -bool ok = await agones.ConnectAsync(); -``` - -### Ready - -To mark the game server as [ready to receive player connections]({{< relref "_index.md#ready" >}}), call the async method `ReadyAsync()`. - -```csharp -async void SomeMethod() -{ - var status = await agones.ReadyAsync(); -} -``` - -### Health - -To send `Health` pings, call the async method `HealthAsync()` -```csharp -await agones.HealthAsync(); -``` - -### GetGameServer - -To get the details on the [backing `GameServer`]({{< relref "_index.md#gameserver" >}}) call `GetGameServerAsync()`. - -Will return `null` if there is an error in retrieving the `GameServer` record. - -```csharp -var gameserver = await agones.GetGameServerAsync(); -``` - -### Reserve - -To mark the GameServer as [Reserved]({{< relref "_index.md#reserveseconds" >}}) for a duration call -`ReserveAsync(long duration)`. - -```csharp -long duration = 30; -var status = await agones.ReserveAsync(duration); -``` - -### ShutDown - -To mark that the [game session is completed]({{< relref "_index.md#shutdown" >}}) and the game server should be shut down call `ShutdownAsync()`. - -```csharp -var status = await agones.ShutdownAsync(); -``` - -### SetAnnotation & SetLabel -Similarly `SetAnnotation(string key, string value)` and `SetLabel(string key, string value)` are async methods that perform an action & return a `Status` object. - -### WatchGameServer - -To watch when -[the backing `GameServer` configuration changes]({{< relref "_index.md#watchgameserverfunctiongameserver" >}}) -call `WatchGameServer(callback)`, where the delegate function `callback` of type `Action` will be executed every time the `GameServer` -configuration changes. -This process is non-blocking internally. - -```csharp -agonesSDK.WatchGameServer((gameServer) => { Console.WriteLine($"Server - Watch {gameServer}");}); -``` - -{{% feature publishVersion="1.40.0" %}} - -### Counters And Lists - -{{< alpha title="Counters And Lists" gate="CountsAndLists" >}} - -#### Counters - -##### Alpha: GetCounterCount - -Returns the Count for a Counter, given the Counter's key (name). Will error if the key was not -predefined in the GameServer resource on creation. - -```csharp -string key = "rooms"; -long count = await agones.Alpha().GetCounterCountAsync(key); -``` - -##### Alpha: SetCounterCount - -Sets a count to the given value. Use with care, as this will overwrite any previous invocations’ value. -Cannot be greater than Capacity. - -```csharp -string key = "rooms"; -long amount = 0; -await agones.Alpha().SetCounterCountAsync(key, amount); -``` - -##### Alpha: IncrementCounter - -Increases a counter by the given nonnegative integer amount. Will execute the increment operation -against the current CRD value. Will max at max(int64). Will error if the key was not predefined in -the GameServer resource on creation. Errors if the count is at the current capacity (to the latest -knowledge of the SDK), and no increment will occur. - -Note: A potential race condition here is that if count values are set from both the SDK and through -the K8s API (Allocation or otherwise), since the SDK append operation back to the CRD value is -batched asynchronous any value incremented past the capacity will be silently truncated. - -```csharp -string key = "rooms"; -long amount = 1; -await agones.Alpha().IncrementCounterAsync(key, amount); -``` - -##### Alpha: DecrementCounter - -Decreases the current count by the given nonnegative integer amount. The Counter Will not go below 0. -Will execute the decrement operation against the current CRD value. Errors if the count is at 0 (to -the latest knowledge of the SDK), and no decrement will occur. - -```csharp -string key = "rooms"; -long amount = 2; -await agones.Alpha().DecrementCounterAsync(key, amount); -``` - -##### Alpha: SetCounterCapacity - -Sets the capacity for the given Counter. A capacity of 0 is no capacity. - -```csharp -string key = "rooms"; -long amount = 0; -await agones.Alpha().SetCounterCapacityAsync(key, amount); -``` - -##### Alpha: GetCounterCapacity - -Returns the Capacity for a Counter, given the Counter's key (name). Will error if the key was not -predefined in the GameServer resource on creation. - -```csharp -string key = "rooms"; -long count = await agones.Alpha().GetCounterCapacityAsync(key); -``` -#$## Lists - -##$## Alpha: AppendListValue - -Appends a string to a List's values list, given the List's key (name) and the string value. Will -error if the string already exists in the list. Will error if the key was not predefined in the -GameServer resource on creation. Will error if the list is already at capacity. - -```csharp -string key = "players"; -string value = "player1"; -await agones.Alpha().AppendListValueAsync(key, value); -``` - -##$## Alpha: DeleteListValue - -DeleteListValue removes a string from a List's values list, given the List's key (name) and the -string value. Will error if the string does not exist in the list. Will error if the key was not -predefined in the GameServer resource on creation. - -```csharp -string key = "players"; -string value = "player2"; -await agones.Alpha().DeleteListValueAsync(key, value); -``` - -###$# Alpha: SetListCapacity - -Sets the capacity for a given list. Capacity must be between 0 and 1000. Will error if the key was -not predefined in the GameServer resource on creation. - -```csharp -string key = "players"; -long amount = 1000; -await agones.Alpha().SetListCapacityAsync(key, amount); -``` - -##$## Alpha: GetListCapacity - -Returns the Capacity for a List, given the List's key (name). Will error if the key was not -predefined in the GameServer resource on creation. - -```csharp -string key = "players"; -long amount = await agones.Alpha().GetListCapacityAsync(key); -``` - -##$## Alpha: ListContains - -Returns if a string exists in a List's values list, given the List's key (name) and the string value. -Search is case-sensitive. Will error if the key was not predefined in the GameServer resource on creation. - -```csharp -string key = "players"; -string value = "player3"; -bool contains = await agones.Alpha().ListContainsAsync(key, value); -``` - -##$## Alpha: GetListLength - -GetListLength returns the length of the Values list for a List, given the List's key (name). Will -error if the key was not predefined in the GameServer resource on creation. - -```csharp -string key = "players"; -int listLength = await agones.Alpha().GetListLengthAsync(key); -``` - -##$## Alpha: GetListValues - -Returns the > Values for a List, given the List's key (name). Will error if the key -was not predefined in the GameServer resource on creation. - -```csharp -string key = "players"; -List values = await agones.Alpha().GetListValuesAsync(key); -``` -{{% /feature %}} - -### Player Tracking - -{{< alpha title="Player Tracking" gate="PlayerTracking" >}} - -#### Alpha: PlayerConnect - -This method increases the SDK’s stored player count by one, and appends this playerID to GameServer.Status.Players.IDs. -Returns true and adds the playerID to the list of playerIDs if the playerIDs was not already in the list of connected playerIDs. - -```csharp -bool ok = await agones.Alpha().PlayerConnectAsync(playerId); -``` - -#### Alpha: PlayerDisconnect - -This function decreases the SDK’s stored player count by one, and removes the playerID from GameServer.Status.Players.IDs. -Will return true and remove the supplied playerID from the list of connected playerIDs if the playerID value exists within the list. - -```csharp -bool ok = await agones.Alpha().PlayerDisconnectAsync(playerId); -``` - -#### Alpha: SetPlayerCapacity - -Update the `GameServer.Status.Players.Capacity` value with a new capacity. - -```csharp -var capacity = 100; -var status = await agones.Alpha().SetPlayerCapacityAsync(capacity); -``` - -#### Alpha: GetPlayerCapacity - -This function retrieves the current player capacity `GameServer.Status.Players.Capacity`. -This is always accurate from what has been set through this SDK, even if the value has yet to be updated on the GameServer status resource. - -```csharp -long cap = await agones.Alpha().GetPlayerCapacityAsync(); -``` - -#### Alpha: GetPlayerCount - -Returns the current player count - -```csharp -long count = await agones.Alpha().GetPlayerCountAsync(); -``` - -#### Alpha: IsPlayerConnected - -This returns if the playerID is currently connected to the GameServer. -This is always accurate, even if the value hasn’t been updated to the GameServer status yet. - -```csharp -var playerId = "player1"; -bool isConnected = await agones.Alpha().IsPlayerConnectedAsync(playerId); -``` - -## Remarks -- All requests other than `ConnectAsync` will wait for up to 15 seconds before giving up, time to wait can also be set in the constructor. -- Default host & port are `localhost:9357` -- Methods that do not return a data object such as `GameServer` will return a gRPC `Grpc.Core.Status` object. To check the state of the request, check `Status.StatusCode` & `Status.Detail`. -Ex: -```csharp -if(status.StatusCode == StatusCode.OK) - //do stuff -``` +--- +title: "C# Game Server Client SDK" +linkTitle: "C#" +date: 2020-2-25 +weight: 50 +description: "This is the C# version of the Agones Game Server Client SDK." +publishDate: 2020-05-28 +--- + +Check the [Client SDK Documentation]({{< relref "_index.md" >}}) for more details on each of the SDK functions and how to run the SDK locally. + + +## SDK Functionality + + +| Area | Action | Implemented | +|-----------------|---------------------|-------------| +| Lifecycle | Ready | ✔️ | +| Lifecycle | Health | ✔️ | +| Lifecycle | Reserve | ✔️ | +| Lifecycle | Allocate | ✔️ | +| Lifecycle | Shutdown | ✔️ | +| Configuration | GetGameServer | ✔️ | +| Configuration | WatchGameServer | ✔️ | +| Metadata | SetAnnotation | ✔️ | +| Metadata | SetLabel | ✔️ | +| Counters | GetCounterCount | ✔️ | +| Counters | SetCounterCount | ✔️ | +| Counters | IncrementCounter | ✔️ | +| Counters | DecrementCounter | ✔️ | +| Counters | SetCounterCapacity | ✔️ | +| Counters | GetCounterCapacity | ✔️ | +| Lists | AppendListValue | ✔️ | +| Lists | DeleteListValue | ✔️ | +| Lists | SetListCapacity | ✔️ | +| Lists | GetListCapacity | ✔️ | +| Lists | ListContains | ✔️ | +| Lists | GetListLength | ✔️ | +| Lists | GetListValues | ✔️ | +| Player Tracking | GetConnectedPlayers | ✔️ | +| Player Tracking | GetPlayerCapacity | ✔️ | +| Player Tracking | GetPlayerCount | ✔️ | +| Player Tracking | IsPlayerConnected | ✔️ | +| Player Tracking | PlayerConnect | ✔️ | +| Player Tracking | PlayerDisconnect | ✔️ | +| Player Tracking | SetPlayerCapacity | ✔️ | + + +## Download + +Download the source {{< ghlink href="sdks/csharp" >}}directly from GitHub{{< /ghlink >}}. + +## Install using NuGet + +- Download the nuget package [directly](https://www.nuget.org/packages/AgonesSDK/) +- Install the latest version using the Package Manager: `Install-Package AgonesSDK` +- Install the latest version using the .NET CLI: `dotnet add package AgonesSDK` + +To select a specific version, append `--version`, for example: `--version 1.8.0` to either commands. + +## Prerequisites + +- .Net Standard 2.0 compliant framework. + +## Usage + +Reference the SDK in your project & create a new instance of the SDK wrapper: + +### Initialization + +To use the AgonesSDK, you will need to import the namespace by adding `using Agones;` at the beginning of your relevant files. + +```csharp +var agones = new AgonesSDK(); +``` + +### Connection + +To connect to the SDK server, either locally or when running on Agones, run the `ConnectAsync()` method. +This will wait for up to 30 seconds if the SDK server has not yet started and the connection cannot be made, +and will return `false` if there was an issue connecting. + +```csharp +bool ok = await agones.ConnectAsync(); +``` + +### Ready + +To mark the game server as [ready to receive player connections]({{< relref "_index.md#ready" >}}), call the async method `ReadyAsync()`. + +```csharp +async void SomeMethod() +{ + var status = await agones.ReadyAsync(); +} +``` + +### Health + +To send `Health` pings, call the async method `HealthAsync()` +```csharp +await agones.HealthAsync(); +``` + +### GetGameServer + +To get the details on the [backing `GameServer`]({{< relref "_index.md#gameserver" >}}) call `GetGameServerAsync()`. + +Will return `null` if there is an error in retrieving the `GameServer` record. + +```csharp +var gameserver = await agones.GetGameServerAsync(); +``` + +### Reserve + +To mark the GameServer as [Reserved]({{< relref "_index.md#reserveseconds" >}}) for a duration call +`ReserveAsync(long duration)`. + +```csharp +long duration = 30; +var status = await agones.ReserveAsync(duration); +``` + +### ShutDown + +To mark that the [game session is completed]({{< relref "_index.md#shutdown" >}}) and the game server should be shut down call `ShutdownAsync()`. + +```csharp +var status = await agones.ShutdownAsync(); +``` + +### SetAnnotation & SetLabel +Similarly `SetAnnotation(string key, string value)` and `SetLabel(string key, string value)` are async methods that perform an action & return a `Status` object. + +### WatchGameServer + +To watch when +[the backing `GameServer` configuration changes]({{< relref "_index.md#watchgameserverfunctiongameserver" >}}) +call `WatchGameServer(callback)`, where the delegate function `callback` of type `Action` will be executed every time the `GameServer` +configuration changes. +This process is non-blocking internally. + +```csharp +agonesSDK.WatchGameServer((gameServer) => { Console.WriteLine($"Server - Watch {gameServer}");}); +``` + + +### Counters And Lists + +{{< alpha title="Counters And Lists" gate="CountsAndLists" >}} + +#### Counters + +##### Alpha: GetCounterCount + +Returns the Count for a Counter, given the Counter's key (name). Will error if the key was not +predefined in the GameServer resource on creation. + +```csharp +string key = "rooms"; +long count = await agones.Alpha().GetCounterCountAsync(key); +``` + +##### Alpha: SetCounterCount + +Sets a count to the given value. Use with care, as this will overwrite any previous invocations’ value. +Cannot be greater than Capacity. + +```csharp +string key = "rooms"; +long amount = 0; +await agones.Alpha().SetCounterCountAsync(key, amount); +``` + +##### Alpha: IncrementCounter + +Increases a counter by the given nonnegative integer amount. Will execute the increment operation +against the current CRD value. Will max at max(int64). Will error if the key was not predefined in +the GameServer resource on creation. Errors if the count is at the current capacity (to the latest +knowledge of the SDK), and no increment will occur. + +Note: A potential race condition here is that if count values are set from both the SDK and through +the K8s API (Allocation or otherwise), since the SDK append operation back to the CRD value is +batched asynchronous any value incremented past the capacity will be silently truncated. + +```csharp +string key = "rooms"; +long amount = 1; +await agones.Alpha().IncrementCounterAsync(key, amount); +``` + +##### Alpha: DecrementCounter + +Decreases the current count by the given nonnegative integer amount. The Counter Will not go below 0. +Will execute the decrement operation against the current CRD value. Errors if the count is at 0 (to +the latest knowledge of the SDK), and no decrement will occur. + +```csharp +string key = "rooms"; +long amount = 2; +await agones.Alpha().DecrementCounterAsync(key, amount); +``` + +##### Alpha: SetCounterCapacity + +Sets the capacity for the given Counter. A capacity of 0 is no capacity. + +```csharp +string key = "rooms"; +long amount = 0; +await agones.Alpha().SetCounterCapacityAsync(key, amount); +``` + +##### Alpha: GetCounterCapacity + +Returns the Capacity for a Counter, given the Counter's key (name). Will error if the key was not +predefined in the GameServer resource on creation. + +```csharp +string key = "rooms"; +long count = await agones.Alpha().GetCounterCapacityAsync(key); +``` +#$## Lists + +##$## Alpha: AppendListValue + +Appends a string to a List's values list, given the List's key (name) and the string value. Will +error if the string already exists in the list. Will error if the key was not predefined in the +GameServer resource on creation. Will error if the list is already at capacity. + +```csharp +string key = "players"; +string value = "player1"; +await agones.Alpha().AppendListValueAsync(key, value); +``` + +##$## Alpha: DeleteListValue + +DeleteListValue removes a string from a List's values list, given the List's key (name) and the +string value. Will error if the string does not exist in the list. Will error if the key was not +predefined in the GameServer resource on creation. + +```csharp +string key = "players"; +string value = "player2"; +await agones.Alpha().DeleteListValueAsync(key, value); +``` + +###$# Alpha: SetListCapacity + +Sets the capacity for a given list. Capacity must be between 0 and 1000. Will error if the key was +not predefined in the GameServer resource on creation. + +```csharp +string key = "players"; +long amount = 1000; +await agones.Alpha().SetListCapacityAsync(key, amount); +``` + +##$## Alpha: GetListCapacity + +Returns the Capacity for a List, given the List's key (name). Will error if the key was not +predefined in the GameServer resource on creation. + +```csharp +string key = "players"; +long amount = await agones.Alpha().GetListCapacityAsync(key); +``` + +##$## Alpha: ListContains + +Returns if a string exists in a List's values list, given the List's key (name) and the string value. +Search is case-sensitive. Will error if the key was not predefined in the GameServer resource on creation. + +```csharp +string key = "players"; +string value = "player3"; +bool contains = await agones.Alpha().ListContainsAsync(key, value); +``` + +##$## Alpha: GetListLength + +GetListLength returns the length of the Values list for a List, given the List's key (name). Will +error if the key was not predefined in the GameServer resource on creation. + +```csharp +string key = "players"; +int listLength = await agones.Alpha().GetListLengthAsync(key); +``` + +##$## Alpha: GetListValues + +Returns the > Values for a List, given the List's key (name). Will error if the key +was not predefined in the GameServer resource on creation. + +```csharp +string key = "players"; +List values = await agones.Alpha().GetListValuesAsync(key); +``` + +### Player Tracking + +{{< alpha title="Player Tracking" gate="PlayerTracking" >}} + +#### Alpha: PlayerConnect + +This method increases the SDK’s stored player count by one, and appends this playerID to GameServer.Status.Players.IDs. +Returns true and adds the playerID to the list of playerIDs if the playerIDs was not already in the list of connected playerIDs. + +```csharp +bool ok = await agones.Alpha().PlayerConnectAsync(playerId); +``` + +#### Alpha: PlayerDisconnect + +This function decreases the SDK’s stored player count by one, and removes the playerID from GameServer.Status.Players.IDs. +Will return true and remove the supplied playerID from the list of connected playerIDs if the playerID value exists within the list. + +```csharp +bool ok = await agones.Alpha().PlayerDisconnectAsync(playerId); +``` + +#### Alpha: SetPlayerCapacity + +Update the `GameServer.Status.Players.Capacity` value with a new capacity. + +```csharp +var capacity = 100; +var status = await agones.Alpha().SetPlayerCapacityAsync(capacity); +``` + +#### Alpha: GetPlayerCapacity + +This function retrieves the current player capacity `GameServer.Status.Players.Capacity`. +This is always accurate from what has been set through this SDK, even if the value has yet to be updated on the GameServer status resource. + +```csharp +long cap = await agones.Alpha().GetPlayerCapacityAsync(); +``` + +#### Alpha: GetPlayerCount + +Returns the current player count + +```csharp +long count = await agones.Alpha().GetPlayerCountAsync(); +``` + +#### Alpha: IsPlayerConnected + +This returns if the playerID is currently connected to the GameServer. +This is always accurate, even if the value hasn’t been updated to the GameServer status yet. + +```csharp +var playerId = "player1"; +bool isConnected = await agones.Alpha().IsPlayerConnectedAsync(playerId); +``` + +## Remarks +- All requests other than `ConnectAsync` will wait for up to 15 seconds before giving up, time to wait can also be set in the constructor. +- Default host & port are `localhost:9357` +- Methods that do not return a data object such as `GameServer` will return a gRPC `Grpc.Core.Status` object. To check the state of the request, check `Status.StatusCode` & `Status.Detail`. +Ex: +```csharp +if(status.StatusCode == StatusCode.OK) + //do stuff +``` diff --git a/site/content/en/docs/Guides/counters-and-lists.md b/site/content/en/docs/Guides/counters-and-lists.md index fecfca8a3d..df6c1c45fd 100644 --- a/site/content/en/docs/Guides/counters-and-lists.md +++ b/site/content/en/docs/Guides/counters-and-lists.md @@ -286,17 +286,6 @@ For more details on how Agones implements infrastructure optimisation, see the d Another optimisation control you can apply with `Fleets` when Agones' scaled them down, is to also set `priorities` to influence the order in which `GameServers` are shutdown and deleted. -{{< feature expiryVersion="1.40.0" >}} - -{{% alert title="Warning" color="warning" %}} -In versions 1.39.0 and lower, Fleet prioritisation is calculated using _total capacity_, not _available capacity_. This -is being updated in the 1.40.0 release such that this and all uses of `priorities` operate using _available capacity_, -and unless otherwise noted, will be the default behaviour in future releases. - -Therefore, in this rare case, the documentation on this functionality is forward-looking. -{{% /alert %}} - -{{< /feature >}} 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 @@ -385,4 +374,4 @@ and how to use them. Allocation into your workflow easier. [gameserverstatus]: {{< ref "/docs/Reference/agones_crd_api_reference.html#agones.dev/v1.GameServerStatus" >}} -[gameserverallocation]: {{< ref "/docs/Reference/agones_crd_api_reference.html#allocation.agones.dev/v1.GameServerAllocationSpec" >}} \ No newline at end of file +[gameserverallocation]: {{< ref "/docs/Reference/agones_crd_api_reference.html#allocation.agones.dev/v1.GameServerAllocationSpec" >}} diff --git a/site/content/en/docs/Guides/feature-stages.md b/site/content/en/docs/Guides/feature-stages.md index 7a5f9e0e0b..16650e4165 100644 --- a/site/content/en/docs/Guides/feature-stages.md +++ b/site/content/en/docs/Guides/feature-stages.md @@ -24,19 +24,6 @@ that can be found in the [Helm configuration]({{< ref "/docs/Installation/Instal The current set of `alpha` and `beta` feature gates: -{{% feature expiryVersion="1.40.0" %}} -| Feature Name | Gate | Default | Stage | Since | -|-----------------------------------------------------------------------------------------------------------------------|--------------------------------|----------|---------|--------| -| [Allocated GameServers are notified on relevant Fleet Updates][fleet-updates] | `FleetAllocationOverflow` | Enabled | `Beta` | 1.37.0 | -| [CountsAndLists](https://github.com/googleforgames/agones/issues/2716) | `CountsAndLists` | Disabled | `Alpha` | 1.37.0 | -| [DisableResyncOnSDKServer](https://github.com/googleforgames/agones/issues/3377) | `DisableResyncOnSDKServer` | Disabled | `Alpha` | 1.37.0 | -| [GameServer player capacity filtering on GameServerAllocations](https://github.com/googleforgames/agones/issues/1239) | `PlayerAllocationFilter` | Disabled | `Alpha` | 1.14.0 | -| [Player Tracking]({{< ref "/docs/Guides/player-tracking.md" >}}) | `PlayerTracking` | Disabled | `Alpha` | 1.6.0 | -| Example Gate (not in use) | `Example` | Disabled | None | 0.13.0 | - -[fleet-updates]: {{% relref "./fleet-updates.md#notifying-gameservers-on-fleet-updatedownscale" %}} -{{% /feature %}} -{{% feature publishVersion="1.40.0" %}} | Feature Name | Gate | Default | Stage | Since | |-----------------------------------------------------------------------------------------------------------------------------|------------------------------------|----------|---------|--------| | [DisableResyncOnSDKServer](https://github.com/googleforgames/agones/issues/3377) | `DisableResyncOnSDKServer` | Enabled | `Beta` | 1.40.0 | @@ -47,7 +34,6 @@ The current set of `alpha` and `beta` feature gates: | Example Gate (not in use) | `Example` | Disabled | None | 0.13.0 | [fleet-updates]: {{% relref "./fleet-updates.md#notifying-gameservers-on-fleet-updatedownscale" %}} -{{% /feature %}} {{< alert title="Note" color="info" >}} diff --git a/site/content/en/docs/Guides/fleet-updates.md b/site/content/en/docs/Guides/fleet-updates.md index 7abb992635..ec5ad9df12 100644 --- a/site/content/en/docs/Guides/fleet-updates.md +++ b/site/content/en/docs/Guides/fleet-updates.md @@ -127,9 +127,6 @@ the rate that you deem fit for your specific rollout. ## Notifying GameServers on Fleet Update/Downscale -{{% feature expiryVersion="1.40.0" %}} -{{< beta title="Allocated GameSever Overflow Notification" gate="FleetAllocationOverflow" >}} -{{% /feature %}} When `Allocated` `GameServers` are utilised for a long time, such as a Lobby `GameServer`, or a `GameServer` that is being reused multiple times in a row, it can be useful diff --git a/site/content/en/docs/Installation/_index.md b/site/content/en/docs/Installation/_index.md index 0f16885290..5d3ec19eef 100644 --- a/site/content/en/docs/Installation/_index.md +++ b/site/content/en/docs/Installation/_index.md @@ -47,7 +47,8 @@ The following table lists recent Agones versions and their corresponding require | Agones version | Kubernetes version(s) | | -------------- | ------------------ | -| 1.39 | {{% k8s-version %}} | +| 1.40 | {{% k8s-version %}} | +| 1.39 | 1.27, 1.28, 1.29 | | 1.38 | 1.26, 1.27, 1.28 | | 1.37 | 1.26, 1.27, 1.28 | | 1.36 | 1.26, 1.27, 1.28 | diff --git a/site/content/en/docs/Reference/fleet.md b/site/content/en/docs/Reference/fleet.md index 8c1b8b0afb..cb16356f4e 100644 --- a/site/content/en/docs/Reference/fleet.md +++ b/site/content/en/docs/Reference/fleet.md @@ -12,89 +12,7 @@ Like any other Kubernetes resource you describe a `Fleet`'s desired state via a A full `Fleet` specification is available below and in the {{< ghlink href="examples/fleet.yaml" >}}example folder{{< /ghlink >}} for reference : -{{% feature expiryVersion="1.40.0" %}} -```yaml -apiVersion: "agones.dev/v1" -kind: Fleet -# Fleet Metadata -# {{< k8s-api-version href="#objectmeta-v1-meta" >}} -metadata: - name: fleet-example -spec: - # the number of GameServers to keep Ready or Allocated in this Fleet - replicas: 2 - # defines how GameServers are organised across the cluster. - # Options include: - # "Packed" (default) is aimed at dynamic Kubernetes clusters, such as cloud providers, wherein we want to bin pack - # resources - # "Distributed" is aimed at static Kubernetes clusters, wherein we want to distribute resources across the entire - # cluster - scheduling: Packed - # a GameServer template - see: - # https://agones.dev/site/docs/reference/gameserver/ for all the options - strategy: - # The replacement strategy for when the GameServer template is changed. Default option is "RollingUpdate", - # "RollingUpdate" will increment by maxSurge value on each iteration, while decrementing by maxUnavailable on each - # iteration, until all GameServers have been switched from one version to another. - # "Recreate" terminates all non-allocated GameServers, and starts up a new set with the new details to replace them. - type: RollingUpdate - # Only relevant when `type: RollingUpdate` - rollingUpdate: - # the amount to increment the new GameServers by. Defaults to 25% - maxSurge: 25% - # the amount to decrements GameServers by. Defaults to 25% - maxUnavailable: 25% - # [Stage:Beta] - # [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` - allocationOverflow: - labels: - mykey: myvalue - version: "" # empty an existing label value - annotations: - otherkey: setthisvalue - # - # [Stage:Alpha] - # [FeatureFlag:CountsAndLists] - # Which `GameServers` in the Fleet are most important to keep around - impacts scale down logic. - # priorities: - # - type: Counter # Sort by a “Counter” - # key: rooms # The name of the Counter. No impact if no GameServer found. - # order: Descending # Default is "Ascending" so smaller available capacity will be removed first on down scaling. - # - type: List # Sort by a “List” - # 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 - metadata: - labels: - foo: bar - # GameServer specification - spec: - ports: - - name: default - portPolicy: Dynamic - containerPort: 26000 - health: - initialDelaySeconds: 30 - periodSeconds: 60 - # Parameters for game server sidecar - sdkServer: - logLevel: Info - grpcPort: 9357 - httpPort: 9358 - # The GameServer's Pod template - template: - spec: - containers: - - name: simple-game-server - image: {{< example-image >}} -``` -{{% /feature %}} -{{% feature publishVersion="1.40.0" %}} ```yaml apiVersion: "agones.dev/v1" kind: Fleet @@ -172,7 +90,6 @@ spec: - name: simple-game-server image: {{< example-image >}} ``` -{{% /feature %}} Since Agones defines a new [Custom Resources Definition (CRD)](https://kubernetes.io/docs/concepts/api-extension/custom-resources/) diff --git a/site/layouts/partials/navbar.html b/site/layouts/partials/navbar.html index 41139329a2..ff931d9ac2 100644 --- a/site/layouts/partials/navbar.html +++ b/site/layouts/partials/navbar.html @@ -27,6 +27,7 @@ {{ if (gt (len .Site.Home.Translations) 0) }}