diff --git a/Cargo.lock b/Cargo.lock index 5c4fbca8..38e02701 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -152,7 +152,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn", ] [[package]] @@ -163,7 +163,7 @@ checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn", ] [[package]] @@ -371,7 +371,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.87", + "syn", ] [[package]] @@ -498,7 +498,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.87", + "syn", ] [[package]] @@ -509,18 +509,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.87", -] - -[[package]] -name = "derivative" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", + "syn", ] [[package]] @@ -539,6 +528,18 @@ version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" +[[package]] +name = "educe" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d7bc049e1bd8cdeb31b68bbd586a9464ecf9f3944af3958a7a9d0f8b9799417" +dependencies = [ + "enum-ordinalize", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "either" version = "1.13.0" @@ -551,6 +552,26 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" +[[package]] +name = "enum-ordinalize" +version = "4.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fea0dcfa4e54eeb516fe454635a95753ddd39acda650ce703031c6973e315dd5" +dependencies = [ + "enum-ordinalize-derive", +] + +[[package]] +name = "enum-ordinalize-derive" +version = "4.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d28318a75d4aead5c4db25382e8ef717932d0346600cacae6357eb5941bc5ff" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "equivalent" version = "1.0.1" @@ -690,7 +711,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn", ] [[package]] @@ -994,9 +1015,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.7" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cde7055719c54e36e95e8719f95883f22072a48ede39db7fc17a4e1d5281e9b9" +checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" dependencies = [ "bytes", "futures-channel", @@ -1007,7 +1028,6 @@ dependencies = [ "pin-project-lite", "socket2", "tokio", - "tower 0.4.13", "tower-service", "tracing", ] @@ -1172,9 +1192,9 @@ dependencies = [ [[package]] name = "k8s-openapi" -version = "0.22.0" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19501afb943ae5806548bc3ebd7f3374153ca057a38f480ef30adfde5ef09755" +checksum = "9c8847402328d8301354c94d605481f25a6bdc1ed65471fd96af8eca71141b13" dependencies = [ "base64 0.22.1", "chrono", @@ -1186,9 +1206,9 @@ dependencies = [ [[package]] name = "kube" -version = "0.94.0" +version = "0.96.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65b8611df85a1a2eed6f47bd8bcca4e2b3dc14fbf83658efd01423ca9a13b72a" +checksum = "efffeb3df0bd4ef3e5d65044573499c0e4889b988070b08c50b25b1329289a1f" dependencies = [ "k8s-openapi", "kube-client", @@ -1199,9 +1219,9 @@ dependencies = [ [[package]] name = "kube-client" -version = "0.94.0" +version = "0.96.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93c5ee3e48ef9b8d8fdb40ddd935f8addc8a201397e3c7552edae7bc96bc0a78" +checksum = "8bf471ece8ff8d24735ce78dac4d091e9fcb8d74811aeb6b75de4d1c3f5de0f1" dependencies = [ "base64 0.22.1", "bytes", @@ -1230,16 +1250,16 @@ dependencies = [ "thiserror", "tokio", "tokio-util", - "tower 0.4.13", + "tower 0.5.1", "tower-http", "tracing", ] [[package]] name = "kube-core" -version = "0.94.0" +version = "0.96.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fe6e24d4cc7e32576f363986dc3dfc13e8e90731bd7a467b67fc6c4bfbf8e95" +checksum = "f42346d30bb34d1d7adc5c549b691bce7aa3a1e60254e68fab7e2d7b26fe3d77" dependencies = [ "chrono", "form_urlencoded", @@ -1255,29 +1275,29 @@ dependencies = [ [[package]] name = "kube-derive" -version = "0.94.0" +version = "0.96.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81ad45b6df8c49bc3a9c22cd6d7a9395a74a2550d6d1db8c98b2f148fb3f75a6" +checksum = "f9364e04cc5e0482136c6ee8b7fb7551812da25802249f35b3def7aaa31e82ad" dependencies = [ "darling", "proc-macro2", "quote", "serde_json", - "syn 2.0.87", + "syn", ] [[package]] name = "kube-runtime" -version = "0.94.0" +version = "0.96.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1a1c065a5296bbd0d1adcddf58e614368f3cf018ec5faf53c001ce4abf8ce24" +checksum = "d3fbf1f6ffa98e65f1d2a9a69338bb60605d46be7edf00237784b89e62c9bd44" dependencies = [ "ahash", "async-broadcast", "async-stream", "async-trait", "backoff", - "derivative", + "educe", "futures", "hashbrown 0.14.5", "json-patch", @@ -1571,7 +1591,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.87", + "syn", ] [[package]] @@ -1612,7 +1632,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn", ] [[package]] @@ -1643,7 +1663,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" dependencies = [ "proc-macro2", - "syn 2.0.87", + "syn", ] [[package]] @@ -1697,7 +1717,7 @@ dependencies = [ "prost", "prost-types", "regex", - "syn 2.0.87", + "syn", "tempfile", ] @@ -1711,7 +1731,7 @@ dependencies = [ "itertools", "proc-macro2", "quote", - "syn 2.0.87", + "syn", ] [[package]] @@ -2062,7 +2082,7 @@ dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 2.0.87", + "syn", ] [[package]] @@ -2073,11 +2093,10 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "secrecy" -version = "0.8.0" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bd1c54ea06cfd2f6b63219704de0b9b4f72dcc2b8fdef820be6cd799780e91e" +checksum = "e891af845473308773346dc847b2c23ee78fe442e0472ac50e22a18a93d3ae5a" dependencies = [ - "serde", "zeroize", ] @@ -2143,7 +2162,7 @@ checksum = "de523f781f095e28fa605cdce0f8307e451cc0fd14e2eb4cd2e98a355b147766" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn", ] [[package]] @@ -2154,7 +2173,7 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn", ] [[package]] @@ -2441,7 +2460,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.87", + "syn", ] [[package]] @@ -2450,17 +2469,6 @@ version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - [[package]] name = "syn" version = "2.0.87" @@ -2517,7 +2525,7 @@ checksum = "b08be0f17bd307950653ce45db00cd31200d82b624b36e181337d9c7d92765b5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn", ] [[package]] @@ -2570,7 +2578,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn", ] [[package]] @@ -2729,6 +2737,7 @@ dependencies = [ "pin-project-lite", "sync_wrapper 0.1.2", "tokio", + "tokio-util", "tower-layer", "tower-service", "tracing", @@ -2736,16 +2745,15 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.5.2" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e9cd434a998747dd2c4276bc96ee2e0c7a2eadf3cae88e52be55a05fa9053f5" +checksum = "8437150ab6bbc8c5f0f519e3d5ed4aa883a83dd4cdd3d1b21f9482936046cb97" dependencies = [ - "base64 0.21.7", + "base64 0.22.1", "bitflags 2.6.0", "bytes", "http", "http-body", - "http-body-util", "mime", "pin-project-lite", "tower-layer", @@ -2799,7 +2807,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn", ] [[package]] @@ -2986,7 +2994,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.87", + "syn", "wasm-bindgen-shared", ] @@ -3020,7 +3028,7 @@ checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3227,7 +3235,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index e58a7f8b..53fc80b4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -43,8 +43,8 @@ hostname = "0.4.0" http = "1.1.0" hyper = "1.4.1" insta = { version = "1.39.0", features = ["yaml", "toml", "redactions"] } -k8s-openapi = { version = "0.22.0", features = ["latest", "schemars"] } -kube = { version = "0.94.0", features = ["runtime", "client", "derive" ] } +k8s-openapi = { version = "0.23.0", features = ["latest", "schemars"] } +kube = { version = "0.96.0", features = ["runtime", "client", "derive" ] } lazy_static = "1.5.0" paste = "1.0.15" pbjson-types = "0.7.0" diff --git a/packages/shulker-operator/src/reconcilers/minecraft_server/gameserver.rs b/packages/shulker-operator/src/reconcilers/minecraft_server/gameserver.rs index 38f65cdd..639901e9 100644 --- a/packages/shulker-operator/src/reconcilers/minecraft_server/gameserver.rs +++ b/packages/shulker-operator/src/reconcilers/minecraft_server/gameserver.rs @@ -246,14 +246,12 @@ impl<'a> GameServerBuilder { Volume { name: "shulker-config".to_string(), config_map: Some(ConfigMapVolumeSource { - name: Some( - minecraft_server - .spec - .config - .existing_config_map_name - .clone() - .unwrap_or_else(|| ConfigMapBuilder::name(minecraft_server)), - ), + name: minecraft_server + .spec + .config + .existing_config_map_name + .clone() + .unwrap_or_else(|| ConfigMapBuilder::name(minecraft_server)), ..ConfigMapVolumeSource::default() }), ..Volume::default() @@ -512,7 +510,7 @@ impl<'a> GameServerBuilder { name: "CFG_VELOCITY_FORWARDING_SECRET".to_string(), value_from: Some(EnvVarSource { secret_key_ref: Some(SecretKeySelector { - name: Some(format!("{}-forwarding-secret", spec.cluster_ref.name)), + name: format!("{}-forwarding-secret", spec.cluster_ref.name), key: "key".to_string(), ..SecretKeySelector::default() }), @@ -755,8 +753,6 @@ mod tests { .as_ref() .unwrap() .name - .as_ref() - .unwrap() == "my_way_better_config" ) } @@ -803,7 +799,7 @@ mod tests { let mut server = TEST_SERVER.clone(); server.spec.pod_overrides.as_mut().unwrap().image = Some(ImageOverrideSpec { image_pull_secrets: Some(vec![LocalObjectReference { - name: Some("my_pull_secret".to_string()), + name: "my_pull_secret".to_string(), }]), ..ImageOverrideSpec::default() }); @@ -828,7 +824,7 @@ mod tests { assert_eq!( pod_template.spec.as_ref().unwrap().image_pull_secrets, Some(vec![LocalObjectReference { - name: Some("my_pull_secret".to_string()) + name: "my_pull_secret".to_string() }]) ); } diff --git a/packages/shulker-operator/src/reconcilers/proxy_fleet/fleet.rs b/packages/shulker-operator/src/reconcilers/proxy_fleet/fleet.rs index 5fbfc110..163a3f88 100644 --- a/packages/shulker-operator/src/reconcilers/proxy_fleet/fleet.rs +++ b/packages/shulker-operator/src/reconcilers/proxy_fleet/fleet.rs @@ -484,7 +484,7 @@ impl<'a> FleetBuilder { name: "SHULKER_PROXY_REDIS_USERNAME".to_string(), value_from: Some(EnvVarSource { secret_key_ref: Some(SecretKeySelector { - name: Some(redis_ref_credentials_secret_name.clone()), + name: redis_ref_credentials_secret_name.clone(), key: "username".to_string(), ..SecretKeySelector::default() }), @@ -496,7 +496,7 @@ impl<'a> FleetBuilder { name: "SHULKER_PROXY_REDIS_PASSWORD".to_string(), value_from: Some(EnvVarSource { secret_key_ref: Some(SecretKeySelector { - name: Some(redis_ref_credentials_secret_name.clone()), + name: redis_ref_credentials_secret_name.clone(), key: "password".to_string(), ..SecretKeySelector::default() }), @@ -580,16 +580,14 @@ impl<'a> FleetBuilder { Volume { name: "shulker-config".to_string(), config_map: Some(ConfigMapVolumeSource { - name: Some( - proxy_fleet - .spec - .template - .spec - .config - .existing_config_map_name - .clone() - .unwrap_or_else(|| ConfigMapBuilder::name(proxy_fleet)), - ), + name: proxy_fleet + .spec + .template + .spec + .config + .existing_config_map_name + .clone() + .unwrap_or_else(|| ConfigMapBuilder::name(proxy_fleet)), ..ConfigMapVolumeSource::default() }), ..Volume::default() @@ -633,7 +631,7 @@ impl<'a> FleetBuilder { volumes.push(Volume { name: "shulker-external-servers".to_string(), config_map: Some(ConfigMapVolumeSource { - name: Some(ExternalServersConfigMapBuilder::name(context.cluster)), + name: ExternalServersConfigMapBuilder::name(context.cluster), ..ConfigMapVolumeSource::default() }), ..Volume::default() @@ -884,8 +882,6 @@ mod tests { .as_ref() .unwrap() .name - .as_ref() - .unwrap() == "my_way_better_config" ) } @@ -943,7 +939,7 @@ mod tests { .unwrap() .image = Some(ImageOverrideSpec { image_pull_secrets: Some(vec![LocalObjectReference { - name: Some("my_pull_secret".to_string()), + name: "my_pull_secret".to_string(), }]), ..ImageOverrideSpec::default() }); @@ -965,7 +961,7 @@ mod tests { assert_eq!( pod_template.spec.as_ref().unwrap().image_pull_secrets, Some(vec![LocalObjectReference { - name: Some("my_pull_secret".to_string()) + name: "my_pull_secret".to_string() }]) ); }