Skip to content

Commit

Permalink
chore: bump server and proxy images
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremylvln committed Feb 6, 2024
1 parent 31cd569 commit 6ea4ec1
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 11 deletions.
4 changes: 2 additions & 2 deletions examples/getting-started/proxy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ spec:
name: getting-started
replicas: 1
service:
type: ClusterIP
# externalTrafficPolicy: Local
type: LoadBalancer
externalTrafficPolicy: Local
template:
spec:
version:
Expand Down
2 changes: 1 addition & 1 deletion packages/shulker-operator/assets/proxy-probe-readiness.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 3 additions & 0 deletions packages/shulker-operator/src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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";
Expand Down Expand Up @@ -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()),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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";
Expand Down Expand Up @@ -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()),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 6ea4ec1

Please sign in to comment.