From 6ea4ec14a2ba0efafe40ae7aac052ecd0523fd33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Levilain?= Date: Tue, 6 Feb 2024 14:42:41 +0100 Subject: [PATCH] chore: bump server and proxy images --- examples/getting-started/proxy.yaml | 4 ++-- packages/shulker-operator/assets/proxy-probe-readiness.sh | 2 +- packages/shulker-operator/src/constants.rs | 3 +++ .../src/reconcilers/minecraft_server/gameserver.rs | 4 ++-- ...__minecraft_server__gameserver__tests__build_snapshot.snap | 2 +- ..._minecraft_server_fleet__fleet__tests__build_snapshot.snap | 2 +- .../shulker-operator/src/reconcilers/proxy_fleet/fleet.rs | 4 ++-- ...ilers__proxy_fleet__config_map__tests__build_snapshot.snap | 2 +- ...econcilers__proxy_fleet__fleet__tests__build_snapshot.snap | 2 +- 9 files changed, 14 insertions(+), 11 deletions(-) diff --git a/examples/getting-started/proxy.yaml b/examples/getting-started/proxy.yaml index 0977dc92..5073e0a5 100644 --- a/examples/getting-started/proxy.yaml +++ b/examples/getting-started/proxy.yaml @@ -7,8 +7,8 @@ spec: name: getting-started replicas: 1 service: - type: ClusterIP - # externalTrafficPolicy: Local + type: LoadBalancer + externalTrafficPolicy: Local template: spec: version: diff --git a/packages/shulker-operator/assets/proxy-probe-readiness.sh b/packages/shulker-operator/assets/proxy-probe-readiness.sh index 02f5e6f6..0f48adc2 100644 --- a/packages/shulker-operator/assets/proxy-probe-readiness.sh +++ b/packages/shulker-operator/assets/proxy-probe-readiness.sh @@ -6,4 +6,4 @@ if [ -f "/tmp/drain-lock" ]; then echo "Drain lock found" && exit 1 fi -bash /health.sh +bash /usr/bin/health.sh diff --git a/packages/shulker-operator/src/constants.rs b/packages/shulker-operator/src/constants.rs index da29759b..6134583b 100644 --- a/packages/shulker-operator/src/constants.rs +++ b/packages/shulker-operator/src/constants.rs @@ -12,3 +12,6 @@ pub const SHULKER_PLUGIN_VERSION: &str = const_format::concatcp!(env!("CARGO_PKG_VERSION"), "-SNAPSHOT"); #[cfg(not(debug_assertions))] pub const SHULKER_PLUGIN_VERSION: &str = env!("CARGO_PKG_VERSION"); + +pub const PROXY_IMAGE: &str = "itzg/bungeecord:java17-2023.11.0"; +pub const MINECRAFT_SERVER_IMAGE: &str = "itzg/minecraft-server:2024.2.1-java17"; diff --git a/packages/shulker-operator/src/reconcilers/minecraft_server/gameserver.rs b/packages/shulker-operator/src/reconcilers/minecraft_server/gameserver.rs index cc0f9541..058b872b 100644 --- a/packages/shulker-operator/src/reconcilers/minecraft_server/gameserver.rs +++ b/packages/shulker-operator/src/reconcilers/minecraft_server/gameserver.rs @@ -24,6 +24,7 @@ use shulker_crds::v1alpha1::minecraft_server::MinecraftServerVersion; use url::Url; use crate::agent::AgentConfig; +use crate::constants; use crate::reconcilers::agent::get_agent_plugin_url; use crate::reconcilers::agent::AgentSide; use crate::resources::resourceref_resolver::ResourceRefResolver; @@ -37,7 +38,6 @@ use shulker_kube_utils::reconcilers::builder::ResourceBuilder; use super::config_map::ConfigMapBuilder; use super::MinecraftServerReconciler; -const MINECRAFT_SERVER_IMAGE: &str = "itzg/minecraft-server:2023.10.1-java17"; const MINECRAFT_SERVER_SHULKER_CONFIG_DIR: &str = "/mnt/shulker/config"; const MINECRAFT_SERVER_CONFIG_DIR: &str = "/config"; const MINECRAFT_SERVER_DATA_DIR: &str = "/data"; @@ -185,7 +185,7 @@ impl<'a> GameServerBuilder { ..Container::default() }]), containers: vec![Container { - image: Some(MINECRAFT_SERVER_IMAGE.to_string()), + image: Some(constants::MINECRAFT_SERVER_IMAGE.to_string()), name: "minecraft-server".to_string(), ports: Some(vec![ContainerPort { name: Some("minecraft".to_string()), diff --git a/packages/shulker-operator/src/reconcilers/minecraft_server/snapshots/shulker_operator__reconcilers__minecraft_server__gameserver__tests__build_snapshot.snap b/packages/shulker-operator/src/reconcilers/minecraft_server/snapshots/shulker_operator__reconcilers__minecraft_server__gameserver__tests__build_snapshot.snap index db811b22..7815de29 100644 --- a/packages/shulker-operator/src/reconcilers/minecraft_server/snapshots/shulker_operator__reconcilers__minecraft_server__gameserver__tests__build_snapshot.snap +++ b/packages/shulker-operator/src/reconcilers/minecraft_server/snapshots/shulker_operator__reconcilers__minecraft_server__gameserver__tests__build_snapshot.snap @@ -76,7 +76,7 @@ spec: value: 1.20.1 - name: EXTRA_ENV value: my_value - image: "itzg/minecraft-server:2023.10.1-java17" + image: "itzg/minecraft-server:2024.2.1-java17" imagePullPolicy: IfNotPresent name: minecraft-server ports: diff --git a/packages/shulker-operator/src/reconcilers/minecraft_server_fleet/snapshots/shulker_operator__reconcilers__minecraft_server_fleet__fleet__tests__build_snapshot.snap b/packages/shulker-operator/src/reconcilers/minecraft_server_fleet/snapshots/shulker_operator__reconcilers__minecraft_server_fleet__fleet__tests__build_snapshot.snap index 4dd28d15..6c34910f 100644 --- a/packages/shulker-operator/src/reconcilers/minecraft_server_fleet/snapshots/shulker_operator__reconcilers__minecraft_server_fleet__fleet__tests__build_snapshot.snap +++ b/packages/shulker-operator/src/reconcilers/minecraft_server_fleet/snapshots/shulker_operator__reconcilers__minecraft_server_fleet__fleet__tests__build_snapshot.snap @@ -98,7 +98,7 @@ spec: value: 1.20.1 - name: EXTRA_ENV value: my_value - image: "itzg/minecraft-server:2023.10.1-java17" + image: "itzg/minecraft-server:2024.2.1-java17" imagePullPolicy: IfNotPresent name: minecraft-server ports: diff --git a/packages/shulker-operator/src/reconcilers/proxy_fleet/fleet.rs b/packages/shulker-operator/src/reconcilers/proxy_fleet/fleet.rs index 165e203a..086ae18b 100644 --- a/packages/shulker-operator/src/reconcilers/proxy_fleet/fleet.rs +++ b/packages/shulker-operator/src/reconcilers/proxy_fleet/fleet.rs @@ -31,6 +31,7 @@ use shulker_crds::v1alpha1::proxy_fleet::ProxyFleetTemplateVersion; use url::Url; use crate::agent::AgentConfig; +use crate::constants; use crate::reconcilers::agent::get_agent_plugin_url; use crate::reconcilers::agent::AgentSide; use crate::reconcilers::redis_ref::RedisRef; @@ -47,7 +48,6 @@ use shulker_kube_utils::reconcilers::builder::ResourceBuilder; use super::config_map::ConfigMapBuilder; use super::ProxyFleetReconciler; -const PROXY_IMAGE: &str = "itzg/bungeecord:java17-2022.4.1"; const PROXY_SHULKER_CONFIG_DIR: &str = "/mnt/shulker/config"; const PROXY_SHULKER_FORWARDING_SECRET_DIR: &str = "/mnt/shulker/forwarding-secret"; const PROXY_DATA_DIR: &str = "/server"; @@ -205,7 +205,7 @@ impl<'a> FleetBuilder { ..Container::default() }]), containers: vec![Container { - image: Some(PROXY_IMAGE.to_string()), + image: Some(constants::PROXY_IMAGE.to_string()), name: "proxy".to_string(), ports: Some(vec![ContainerPort { name: Some("minecraft".to_string()), diff --git a/packages/shulker-operator/src/reconcilers/proxy_fleet/snapshots/shulker_operator__reconcilers__proxy_fleet__config_map__tests__build_snapshot.snap b/packages/shulker-operator/src/reconcilers/proxy_fleet/snapshots/shulker_operator__reconcilers__proxy_fleet__config_map__tests__build_snapshot.snap index 5a4052f1..6c325f3f 100644 --- a/packages/shulker-operator/src/reconcilers/proxy_fleet/snapshots/shulker_operator__reconcilers__proxy_fleet__config_map__tests__build_snapshot.snap +++ b/packages/shulker-operator/src/reconcilers/proxy_fleet/snapshots/shulker_operator__reconcilers__proxy_fleet__config_map__tests__build_snapshot.snap @@ -6,7 +6,7 @@ apiVersion: v1 kind: ConfigMap data: init-fs.sh: "#!/bin/sh\nset -euo pipefail\nset -o xtrace\n\ncp \"${SHULKER_CONFIG_DIR}/probe-readiness.sh\" \"${SHULKER_PROXY_DATA_DIR}/probe-readiness.sh\"\ncat \"${SHULKER_CONFIG_DIR}/server-icon.png\" | base64 -d > \"${SHULKER_PROXY_DATA_DIR}/server-icon.png\"\n\nif [ \"${SHULKER_VERSION_CHANNEL}\" == \"Velocity\" ]; then\n cp \"${SHULKER_CONFIG_DIR}/velocity-config.toml\" \"${SHULKER_PROXY_DATA_DIR}/velocity.toml\"\n echo \"dummy\" > \"${SHULKER_PROXY_DATA_DIR}/forwarding.secret\"\nelse\n cp \"${SHULKER_CONFIG_DIR}/bungeecord-config.yml\" \"${SHULKER_PROXY_DATA_DIR}/config.yml\"\nfi\n\nif [ ! -z \"${SHULKER_PROXY_PLUGIN_URLS+x}\" ]; then\n mkdir -p \"${SHULKER_PROXY_DATA_DIR}/plugins\"\n for plugin_url in ${SHULKER_PROXY_PLUGIN_URLS//;/ }; do\n (cd \"${SHULKER_PROXY_DATA_DIR}/plugins\" && wget \"${plugin_url}\")\n done\nfi\n\nif [ ! -z \"${SHULKER_PROXY_PATCH_URLS+x}\" ]; then\n for patch_url in ${SHULKER_PROXY_PATCH_URLS//;/ }; do\n (cd \"${SHULKER_PROXY_DATA_DIR}\" && wget \"${patch_url}\" -O - | tar -xzv)\n done\nfi\n" - probe-readiness.sh: "#!/bin/sh\nset -euo pipefail\nset -o xtrace\n\nif [ -f \"/tmp/drain-lock\" ]; then\n echo \"Drain lock found\" && exit 1\nfi\n\nbash /health.sh\n" + probe-readiness.sh: "#!/bin/sh\nset -euo pipefail\nset -o xtrace\n\nif [ -f \"/tmp/drain-lock\" ]; then\n echo \"Drain lock found\" && exit 1\nfi\n\nbash /usr/bin/health.sh\n" server-icon.png: abc== velocity-config.toml: "config-version = \"2.6\"\nbind = \"0.0.0.0:25577\"\nmotd = \"A Motd\"\nshow-max-players = 1000\nonline-mode = true\nforce-key-authentication = true\nprevent-client-proxy-connections = true\nforwarding-secret-file = \"/mnt/shulker/forwarding-secret/key\"\nplayer-info-forwarding-mode = \"modern\"\n\n[servers]\nlobby = \"localhost:30000\"\nlimbo = \"localhost:30001\"\ntry = [\"lobby\", \"limbo\"]\n\n[forced-hosts]\n\n[advanced]\nhaproxy-protocol = true\ntcp-fast-open = true\n\n" metadata: diff --git a/packages/shulker-operator/src/reconcilers/proxy_fleet/snapshots/shulker_operator__reconcilers__proxy_fleet__fleet__tests__build_snapshot.snap b/packages/shulker-operator/src/reconcilers/proxy_fleet/snapshots/shulker_operator__reconcilers__proxy_fleet__fleet__tests__build_snapshot.snap index 9a838bb9..6bdaedeb 100644 --- a/packages/shulker-operator/src/reconcilers/proxy_fleet/snapshots/shulker_operator__reconcilers__proxy_fleet__fleet__tests__build_snapshot.snap +++ b/packages/shulker-operator/src/reconcilers/proxy_fleet/snapshots/shulker_operator__reconcilers__proxy_fleet__fleet__tests__build_snapshot.snap @@ -87,7 +87,7 @@ spec: value: "true" - name: EXTRA_ENV value: my_value - image: "itzg/bungeecord:java17-2022.4.1" + image: "itzg/bungeecord:java17-2023.11.0" imagePullPolicy: IfNotPresent name: proxy ports: