Skip to content

Commit

Permalink
Revert "Upgrade Agones to 1.40.0 + CRD changes (#945)"
Browse files Browse the repository at this point in the history
This reverts commit 90f7e05.
  • Loading branch information
XAMPPRocky committed May 15, 2024
1 parent 0f1f5bc commit 2da5d8a
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 19 deletions.
2 changes: 1 addition & 1 deletion agones/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions agones/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions agones/src/relay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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<Deployment>) {
let service_accounts: Api<ServiceAccount> = client.namespaced_api();
let cluster_roles: Api<ClusterRole> = Api::all(client.kubernetes.clone());
Expand Down
2 changes: 1 addition & 1 deletion docs/src/deployment/quickstarts/agones-xonotic-relay.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/src/deployment/quickstarts/agones-xonotic-xds.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 2 additions & 11 deletions src/config/providers/k8s/agones.rs
Original file line number Diff line number Diff line change
Expand Up @@ -279,15 +279,6 @@ impl kube::core::object::HasSpec for GameServer {
}
}

fn deserialize_null_default<'de, D, T>(deserializer: D) -> Result<T, D::Error>
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 {
Expand All @@ -296,7 +287,7 @@ pub struct GameServerSpec {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub container: Option<String>,
/// 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<GameServerPort>,
/// Configures health checking
pub health: Health,
Expand Down Expand Up @@ -397,7 +388,7 @@ pub struct GameServerStatus {
pub state: GameServerState,
pub ports: Option<Vec<GameServerStatusPort>>,
pub address: String,
#[serde(deserialize_with = "deserialize_null_default")]
#[serde(default)]
pub addresses: Vec<NodeAddress>,
pub node_name: String,
pub reserved_until: Option<k8s_openapi::apimachinery::pkg::apis::meta::v1::Time>,
Expand Down

0 comments on commit 2da5d8a

Please sign in to comment.