From 2da5d8a5f763bd6aa7eb270523b59167822610b3 Mon Sep 17 00:00:00 2001 From: Erin Power Date: Wed, 15 May 2024 09:17:33 +0200 Subject: [PATCH] Revert "Upgrade Agones to 1.40.0 + CRD changes (#945)" This reverts commit 90f7e05ef9c294a93e0c84b329ca28551dbfa817. --- agones/README.md | 2 +- agones/main.tf | 6 +++--- agones/src/relay.rs | 4 ++-- .../deployment/quickstarts/agones-xonotic-relay.md | 2 +- .../deployment/quickstarts/agones-xonotic-xds.md | 2 +- src/config/providers/k8s/agones.rs | 13 ++----------- 6 files changed, 10 insertions(+), 19 deletions(-) diff --git a/agones/README.md b/agones/README.md index 5a5ebe8b47..8771415fa1 100644 --- a/agones/README.md +++ b/agones/README.md @@ -59,7 +59,7 @@ IMAGE_TAG=us-docker.pkg.dev/my-project-name/dev/quilkin:0.4.0-auyz cargo test ### Build, Push and Test in one Go 💪 The [`build/Makefile`](../build/Makefile) provides a targets that can be executed to build a development image, -push it an appropriate location, and run the set of Agones integration tests, depending on where you Kubernetes +push it a appropriate location, and run the set of Agones integration tests, depending on where you Kubernetes cluster is set up. #### Minikube diff --git a/agones/main.tf b/agones/main.tf index f6595f5cd5..b19225ac9d 100644 --- a/agones/main.tf +++ b/agones/main.tf @@ -54,7 +54,7 @@ variable "node_count" { // Create a GKE cluster with the appropriate structure module "agones_cluster" { - source = "git::https://github.com/googleforgames/agones.git//install/terraform/modules/gke/?ref=release-1.40.0" + source = "git::https://github.com/googleforgames/agones.git//install/terraform/modules/gke/?ref=release-1.33.0" cluster = { "name" = var.name @@ -66,9 +66,9 @@ module "agones_cluster" { // Install Agones via Helm module "helm_agones" { - source = "git::https://github.com/googleforgames/agones.git//install/terraform/modules/helm3/?ref=release-1.40.0" + source = "git::https://github.com/googleforgames/agones.git//install/terraform/modules/helm3/?ref=release-1.33.0" - agones_version = "1.40.0" + agones_version = "1.33.0" values_file = "./helm.yaml" chart = "agones" host = module.agones_cluster.host diff --git a/agones/src/relay.rs b/agones/src/relay.rs index a2bb32b7df..dceecc69ca 100644 --- a/agones/src/relay.rs +++ b/agones/src/relay.rs @@ -113,7 +113,7 @@ mod tests { for i in 0..30 { println!("Connection Attempt: {i}"); - // returns the name of the GameServer. This proves we are routing the allocated + // returns the nae of the GameServer. This proves we are routing the the allocated // GameServer with the correct token attached. socket .send_to(format!("GAMESERVER{token}").as_bytes(), proxy_address) @@ -164,7 +164,7 @@ mod tests { .unwrap(); } - /// Deploys the Agent and Relay Server Deployments and Services + /// Deploys the Agent and Relay Server Deployents and Services async fn agones_agent_deployment(client: &Client, deployments: Api) { let service_accounts: Api = client.namespaced_api(); let cluster_roles: Api = Api::all(client.kubernetes.clone()); diff --git a/docs/src/deployment/quickstarts/agones-xonotic-relay.md b/docs/src/deployment/quickstarts/agones-xonotic-relay.md index c37d7135d6..3295576b29 100644 --- a/docs/src/deployment/quickstarts/agones-xonotic-relay.md +++ b/docs/src/deployment/quickstarts/agones-xonotic-relay.md @@ -196,7 +196,7 @@ Labels: agones.dev/fleet=xonotic agones.dev/gameserverset=xonotic-8ns7b Annotations: agones.dev/last-allocated: 2023-10-04T19:47:04.047026419Z agones.dev/ready-container-id: containerd://b39d30965becdbc40336fd9aa642fe776421553615f642dd599e1b0d88c505b6 - agones.dev/sdk-version: 1.40.0 + agones.dev/sdk-version: 1.33.0 quilkin.dev/tokens: NDU2 API Version: agones.dev/v1 Kind: GameServer diff --git a/docs/src/deployment/quickstarts/agones-xonotic-xds.md b/docs/src/deployment/quickstarts/agones-xonotic-xds.md index e519a623f6..402abc3e95 100644 --- a/docs/src/deployment/quickstarts/agones-xonotic-xds.md +++ b/docs/src/deployment/quickstarts/agones-xonotic-xds.md @@ -188,7 +188,7 @@ Labels: agones.dev/fleet=xonotic agones.dev/gameserverset=xonotic-h5cfn Annotations: agones.dev/last-allocated: 2022-12-19T22:59:22.099818298Z agones.dev/ready-container-id: containerd://7b3d9e9dbda6f2e0381df7669f6117bf3e54171469cfacbce2670605a61ce4b8 - agones.dev/sdk-version: 1.40.0 + agones.dev/sdk-version: 1.33.0 quilkin.dev/tokens: NDU2 API Version: agones.dev/v1 Kind: GameServer diff --git a/src/config/providers/k8s/agones.rs b/src/config/providers/k8s/agones.rs index 8c96112e75..48d400cea7 100644 --- a/src/config/providers/k8s/agones.rs +++ b/src/config/providers/k8s/agones.rs @@ -279,15 +279,6 @@ impl kube::core::object::HasSpec for GameServer { } } -fn deserialize_null_default<'de, D, T>(deserializer: D) -> Result -where - T: Default + Deserialize<'de>, - D: serde::de::Deserializer<'de>, -{ - let opt = Option::deserialize(deserializer)?; - Ok(opt.unwrap_or_default()) -} - #[derive(Clone, Debug, Deserialize, Serialize, JsonSchema)] #[serde(rename_all = "camelCase")] pub struct GameServerSpec { @@ -296,7 +287,7 @@ pub struct GameServerSpec { #[serde(default, skip_serializing_if = "Option::is_none")] pub container: Option, /// Ports are the array of ports that can be exposed via the game server - #[serde(deserialize_with = "deserialize_null_default")] + #[serde(default)] pub ports: Vec, /// Configures health checking pub health: Health, @@ -397,7 +388,7 @@ pub struct GameServerStatus { pub state: GameServerState, pub ports: Option>, pub address: String, - #[serde(deserialize_with = "deserialize_null_default")] + #[serde(default)] pub addresses: Vec, pub node_name: String, pub reserved_until: Option,