From 18f8722d2501284aa379e20822d88588664dc721 Mon Sep 17 00:00:00 2001 From: Techassi Date: Tue, 10 Mar 2026 16:33:23 +0100 Subject: [PATCH 1/4] fix: Delay controller startup to avoid 404 in initial list --- Cargo.lock | 22 +++++++++---------- Cargo.nix | 37 ++++++++++++++++---------------- Cargo.toml | 2 +- crate-hashes.json | 18 ++++++++-------- rust/operator-binary/src/main.rs | 16 +++++++++++--- 5 files changed, 52 insertions(+), 43 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d85224bd..2716d313 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1511,7 +1511,7 @@ dependencies = [ [[package]] name = "k8s-version" version = "0.1.3" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.106.2#f9b117c8c08557e9774f33145bb009fb74cb2437" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.108.0#7486017f60827d1d769d7bf17bf56adb21f8bb02" dependencies = [ "darling", "regex", @@ -2848,7 +2848,7 @@ checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" [[package]] name = "stackable-certs" version = "0.4.0" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.106.2#f9b117c8c08557e9774f33145bb009fb74cb2437" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.108.0#7486017f60827d1d769d7bf17bf56adb21f8bb02" dependencies = [ "const-oid", "ecdsa", @@ -2894,8 +2894,8 @@ dependencies = [ [[package]] name = "stackable-operator" -version = "0.106.2" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.106.2#f9b117c8c08557e9774f33145bb009fb74cb2437" +version = "0.108.0" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.108.0#7486017f60827d1d769d7bf17bf56adb21f8bb02" dependencies = [ "clap", "const_format", @@ -2934,7 +2934,7 @@ dependencies = [ [[package]] name = "stackable-operator-derive" version = "0.3.1" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.106.2#f9b117c8c08557e9774f33145bb009fb74cb2437" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.108.0#7486017f60827d1d769d7bf17bf56adb21f8bb02" dependencies = [ "darling", "proc-macro2", @@ -2945,7 +2945,7 @@ dependencies = [ [[package]] name = "stackable-shared" version = "0.1.0" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.106.2#f9b117c8c08557e9774f33145bb009fb74cb2437" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.108.0#7486017f60827d1d769d7bf17bf56adb21f8bb02" dependencies = [ "jiff", "k8s-openapi", @@ -2961,8 +2961,8 @@ dependencies = [ [[package]] name = "stackable-telemetry" -version = "0.6.1" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.106.2#f9b117c8c08557e9774f33145bb009fb74cb2437" +version = "0.6.2" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.108.0#7486017f60827d1d769d7bf17bf56adb21f8bb02" dependencies = [ "axum", "clap", @@ -2986,7 +2986,7 @@ dependencies = [ [[package]] name = "stackable-versioned" version = "0.8.3" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.106.2#f9b117c8c08557e9774f33145bb009fb74cb2437" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.108.0#7486017f60827d1d769d7bf17bf56adb21f8bb02" dependencies = [ "schemars", "serde", @@ -2999,7 +2999,7 @@ dependencies = [ [[package]] name = "stackable-versioned-macros" version = "0.8.3" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.106.2#f9b117c8c08557e9774f33145bb009fb74cb2437" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.108.0#7486017f60827d1d769d7bf17bf56adb21f8bb02" dependencies = [ "convert_case", "convert_case_extras", @@ -3017,7 +3017,7 @@ dependencies = [ [[package]] name = "stackable-webhook" version = "0.9.0" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.106.2#f9b117c8c08557e9774f33145bb009fb74cb2437" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.108.0#7486017f60827d1d769d7bf17bf56adb21f8bb02" dependencies = [ "arc-swap", "async-trait", diff --git a/Cargo.nix b/Cargo.nix index 37410919..ae8f95fe 100644 --- a/Cargo.nix +++ b/Cargo.nix @@ -4812,7 +4812,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "f9b117c8c08557e9774f33145bb009fb74cb2437"; + rev = "7486017f60827d1d769d7bf17bf56adb21f8bb02"; sha256 = "0yxp9d7x3xzlc7i67mjkizf587hvx8kwjly9p10x320hvp91qf17"; }; libName = "k8s_version"; @@ -9421,7 +9421,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "f9b117c8c08557e9774f33145bb009fb74cb2437"; + rev = "7486017f60827d1d769d7bf17bf56adb21f8bb02"; sha256 = "0yxp9d7x3xzlc7i67mjkizf587hvx8kwjly9p10x320hvp91qf17"; }; libName = "stackable_certs"; @@ -9574,7 +9574,7 @@ rec { { name = "stackable-operator"; packageId = "stackable-operator"; - features = [ "telemetry" "versioned" "webhook" ]; + features = [ "crds" "webhook" ]; } { name = "strum"; @@ -9617,12 +9617,12 @@ rec { }; "stackable-operator" = rec { crateName = "stackable-operator"; - version = "0.106.2"; + version = "0.108.0"; edition = "2024"; workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "f9b117c8c08557e9774f33145bb009fb74cb2437"; + rev = "7486017f60827d1d769d7bf17bf56adb21f8bb02"; sha256 = "0yxp9d7x3xzlc7i67mjkizf587hvx8kwjly9p10x320hvp91qf17"; }; libName = "stackable_operator"; @@ -9730,12 +9730,11 @@ rec { { name = "stackable-shared"; packageId = "stackable-shared"; - features = [ "time" "jiff" ]; + features = [ "jiff" ]; } { name = "stackable-telemetry"; packageId = "stackable-telemetry"; - optional = true; features = [ "clap" ]; } { @@ -9779,14 +9778,14 @@ rec { ]; features = { "certs" = [ "dep:stackable-certs" ]; - "default" = [ "telemetry" "versioned" "clap" ]; - "full" = [ "certs" "telemetry" "versioned" "time" "webhook" "clap" ]; - "telemetry" = [ "dep:stackable-telemetry" ]; + "crds" = [ "dep:stackable-versioned" ]; + "default" = [ "crds" ]; + "full" = [ "crds" "certs" "time" "webhook" "kube-ws" ]; + "kube-ws" = [ "kube/ws" ]; "time" = [ "stackable-shared/time" ]; - "versioned" = [ "dep:stackable-versioned" ]; "webhook" = [ "dep:stackable-webhook" ]; }; - resolvedDefaultFeatures = [ "clap" "default" "telemetry" "versioned" "webhook" ]; + resolvedDefaultFeatures = [ "crds" "default" "webhook" ]; }; "stackable-operator-derive" = rec { crateName = "stackable-operator-derive"; @@ -9795,7 +9794,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "f9b117c8c08557e9774f33145bb009fb74cb2437"; + rev = "7486017f60827d1d769d7bf17bf56adb21f8bb02"; sha256 = "0yxp9d7x3xzlc7i67mjkizf587hvx8kwjly9p10x320hvp91qf17"; }; procMacro = true; @@ -9830,7 +9829,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "f9b117c8c08557e9774f33145bb009fb74cb2437"; + rev = "7486017f60827d1d769d7bf17bf56adb21f8bb02"; sha256 = "0yxp9d7x3xzlc7i67mjkizf587hvx8kwjly9p10x320hvp91qf17"; }; libName = "stackable_shared"; @@ -9906,12 +9905,12 @@ rec { }; "stackable-telemetry" = rec { crateName = "stackable-telemetry"; - version = "0.6.1"; + version = "0.6.2"; edition = "2024"; workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "f9b117c8c08557e9774f33145bb009fb74cb2437"; + rev = "7486017f60827d1d769d7bf17bf56adb21f8bb02"; sha256 = "0yxp9d7x3xzlc7i67mjkizf587hvx8kwjly9p10x320hvp91qf17"; }; libName = "stackable_telemetry"; @@ -10021,7 +10020,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "f9b117c8c08557e9774f33145bb009fb74cb2437"; + rev = "7486017f60827d1d769d7bf17bf56adb21f8bb02"; sha256 = "0yxp9d7x3xzlc7i67mjkizf587hvx8kwjly9p10x320hvp91qf17"; }; libName = "stackable_versioned"; @@ -10065,7 +10064,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "f9b117c8c08557e9774f33145bb009fb74cb2437"; + rev = "7486017f60827d1d769d7bf17bf56adb21f8bb02"; sha256 = "0yxp9d7x3xzlc7i67mjkizf587hvx8kwjly9p10x320hvp91qf17"; }; procMacro = true; @@ -10133,7 +10132,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "f9b117c8c08557e9774f33145bb009fb74cb2437"; + rev = "7486017f60827d1d769d7bf17bf56adb21f8bb02"; sha256 = "0yxp9d7x3xzlc7i67mjkizf587hvx8kwjly9p10x320hvp91qf17"; }; libName = "stackable_webhook"; diff --git a/Cargo.toml b/Cargo.toml index 3402644b..6f125209 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ repository = "https://github.com/stackabletech/hdfs-operator" [workspace.dependencies] product-config = { git = "https://github.com/stackabletech/product-config.git", tag = "0.8.0" } -stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "stackable-operator-0.106.2", features = ["telemetry", "versioned", "webhook"] } +stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "stackable-operator-0.108.0", features = ["crds", "webhook"] } anyhow = "1.0" built = { version = "0.8", features = ["chrono", "git2"] } diff --git a/crate-hashes.json b/crate-hashes.json index 0ec63dc5..3714ebda 100644 --- a/crate-hashes.json +++ b/crate-hashes.json @@ -4,14 +4,14 @@ "git+https://github.com/kube-rs/kube-rs?rev=fe69cc486ff8e62a7da61d64ec3ebbd9e64c43b5#kube-derive@3.0.1": "1irm4g79crlxjm3iqrgvx0f6wxdcj394ky84q89pk9i36y2mlw3n", "git+https://github.com/kube-rs/kube-rs?rev=fe69cc486ff8e62a7da61d64ec3ebbd9e64c43b5#kube-runtime@3.0.1": "1irm4g79crlxjm3iqrgvx0f6wxdcj394ky84q89pk9i36y2mlw3n", "git+https://github.com/kube-rs/kube-rs?rev=fe69cc486ff8e62a7da61d64ec3ebbd9e64c43b5#kube@3.0.1": "1irm4g79crlxjm3iqrgvx0f6wxdcj394ky84q89pk9i36y2mlw3n", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.106.2#k8s-version@0.1.3": "0yxp9d7x3xzlc7i67mjkizf587hvx8kwjly9p10x320hvp91qf17", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.106.2#stackable-certs@0.4.0": "0yxp9d7x3xzlc7i67mjkizf587hvx8kwjly9p10x320hvp91qf17", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.106.2#stackable-operator-derive@0.3.1": "0yxp9d7x3xzlc7i67mjkizf587hvx8kwjly9p10x320hvp91qf17", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.106.2#stackable-operator@0.106.2": "0yxp9d7x3xzlc7i67mjkizf587hvx8kwjly9p10x320hvp91qf17", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.106.2#stackable-shared@0.1.0": "0yxp9d7x3xzlc7i67mjkizf587hvx8kwjly9p10x320hvp91qf17", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.106.2#stackable-telemetry@0.6.1": "0yxp9d7x3xzlc7i67mjkizf587hvx8kwjly9p10x320hvp91qf17", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.106.2#stackable-versioned-macros@0.8.3": "0yxp9d7x3xzlc7i67mjkizf587hvx8kwjly9p10x320hvp91qf17", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.106.2#stackable-versioned@0.8.3": "0yxp9d7x3xzlc7i67mjkizf587hvx8kwjly9p10x320hvp91qf17", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.106.2#stackable-webhook@0.9.0": "0yxp9d7x3xzlc7i67mjkizf587hvx8kwjly9p10x320hvp91qf17", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.108.0#k8s-version@0.1.3": "0yxp9d7x3xzlc7i67mjkizf587hvx8kwjly9p10x320hvp91qf17", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.108.0#stackable-certs@0.4.0": "0yxp9d7x3xzlc7i67mjkizf587hvx8kwjly9p10x320hvp91qf17", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.108.0#stackable-operator-derive@0.3.1": "0yxp9d7x3xzlc7i67mjkizf587hvx8kwjly9p10x320hvp91qf17", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.108.0#stackable-operator@0.108.0": "0yxp9d7x3xzlc7i67mjkizf587hvx8kwjly9p10x320hvp91qf17", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.108.0#stackable-shared@0.1.0": "0yxp9d7x3xzlc7i67mjkizf587hvx8kwjly9p10x320hvp91qf17", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.108.0#stackable-telemetry@0.6.2": "0yxp9d7x3xzlc7i67mjkizf587hvx8kwjly9p10x320hvp91qf17", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.108.0#stackable-versioned-macros@0.8.3": "0yxp9d7x3xzlc7i67mjkizf587hvx8kwjly9p10x320hvp91qf17", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.108.0#stackable-versioned@0.8.3": "0yxp9d7x3xzlc7i67mjkizf587hvx8kwjly9p10x320hvp91qf17", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.108.0#stackable-webhook@0.9.0": "0yxp9d7x3xzlc7i67mjkizf587hvx8kwjly9p10x320hvp91qf17", "git+https://github.com/stackabletech/product-config.git?tag=0.8.0#product-config@0.8.0": "1dz70kapm2wdqcr7ndyjji0lhsl98bsq95gnb2lw487wf6yr7987" } \ No newline at end of file diff --git a/rust/operator-binary/src/main.rs b/rust/operator-binary/src/main.rs index 60a50332..c6170d6c 100644 --- a/rust/operator-binary/src/main.rs +++ b/rust/operator-binary/src/main.rs @@ -18,7 +18,7 @@ use stackable_operator::{ core::v1::{ConfigMap, Service}, }, kube::{ - Api, ResourceExt, + Api, CustomResourceExt, ResourceExt, api::PartialObjectMeta, core::DeserializeGuard, runtime::{ @@ -31,7 +31,7 @@ use stackable_operator::{ logging::controller::report_controller_reconciled, shared::yaml::SerializeOptions, telemetry::Tracing, - utils::signal::SignalWatcher, + utils::signal::{self, SignalWatcher}, }; use tracing::info_span; use tracing_futures::Instrument; @@ -215,8 +215,18 @@ async fn main() -> anyhow::Result<()> { .instrument(info_span!("hdfs_controller")) .map(anyhow::Ok); + let delayed_hdfs_controller = async { + signal::crd_established(&client, v1alpha1::HdfsCluster::crd_name(), None).await?; + hdfs_controller.await + }; + // kube-runtime's Controller will tokio::spawn each reconciliation, so this only concerns the internal watch machinery - futures::try_join!(hdfs_controller, reflector, eos_checker, webhook_server)?; + futures::try_join!( + delayed_hdfs_controller, + webhook_server, + eos_checker, + reflector, + )?; } }; From 3b6e2d7b3365a7e35a9bc4a2f8fdc4631046f36b Mon Sep 17 00:00:00 2001 From: Techassi Date: Tue, 10 Mar 2026 16:34:26 +0100 Subject: [PATCH 2/4] chore: Fix clippy lints --- rust/operator-binary/src/crd/storage.rs | 12 +++++------- rust/operator-binary/src/event.rs | 2 +- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/rust/operator-binary/src/crd/storage.rs b/rust/operator-binary/src/crd/storage.rs index e1627d22..04cb3792 100644 --- a/rust/operator-binary/src/crd/storage.rs +++ b/rust/operator-binary/src/crd/storage.rs @@ -156,25 +156,23 @@ fn default_number_of_datanode_pvcs() -> Option { Some(1) } -#[derive(Clone, Debug, Deserialize, Eq, JsonSchema, PartialEq, Serialize)] +#[derive(Clone, Debug, Default, Deserialize, Eq, JsonSchema, PartialEq, Serialize)] #[serde(rename_all = "PascalCase")] pub enum HdfsStorageType { Archive, + + #[default] Disk, + #[serde(rename = "SSD")] Ssd, + #[serde(rename = "RAMDisk")] RamDisk, } impl Atomic for HdfsStorageType {} -impl Default for HdfsStorageType { - fn default() -> Self { - Self::Disk - } -} - impl HdfsStorageType { pub fn as_hdfs_config_literal(&self) -> &str { match self { diff --git a/rust/operator-binary/src/event.rs b/rust/operator-binary/src/event.rs index 053502e4..3423f8bd 100644 --- a/rust/operator-binary/src/event.rs +++ b/rust/operator-binary/src/event.rs @@ -60,7 +60,7 @@ pub fn build_invalid_replica_message( Some(format!( "{role_name}: only has {replicas} replicas configured, it is strongly recommended to use at least [{min_replicas}]" )) - } else if !role.replicas_can_be_even() && replicas % 2 == 0 { + } else if !role.replicas_can_be_even() && replicas.is_multiple_of(2) { Some(format!( "{role_name}: currently has an even number of replicas [{replicas}], but should always have an odd number to ensure quorum" )) From 68ce2a90d1af41e43733a5a3b784bd2457a98f83 Mon Sep 17 00:00:00 2001 From: Techassi Date: Tue, 10 Mar 2026 16:37:06 +0100 Subject: [PATCH 3/4] chore: Add changelog --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ec9d581b..129eab90 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,12 +13,13 @@ All notable changes to this project will be documented in this file. ### Changed -- Bump stackable-operator to 0.106.2, and strum to 0.28 ([#760]). +- Bump stackable-operator to 0.108.0, and strum to 0.28 ([#760], [#764]). - Gracefully shutdown all concurrent tasks by forwarding the SIGTERM signal ([#747]). - Added warning and exit condition to format-namenodes container script to check for corrupted data after formatting ([#751]). ### Fixed +- Fix "404 page not found" error for the initial object list ([#764]). - Previously, some shell output of init-containers was not logged properly and therefore not aggregated, which is fixed now ([#746]). [#738]: https://github.com/stackabletech/hdfs-operator/pull/738 @@ -28,6 +29,7 @@ All notable changes to this project will be documented in this file. [#751]: https://github.com/stackabletech/hdfs-operator/pull/751 [#753]: https://github.com/stackabletech/hdfs-operator/pull/753 [#760]: https://github.com/stackabletech/hdfs-operator/pull/760 +[#764]: https://github.com/stackabletech/hdfs-operator/pull/764 ## [25.11.0] - 2025-11-07 From 89049409ebfdd1c4724a5954841eb827c5e82116 Mon Sep 17 00:00:00 2001 From: Techassi Date: Tue, 10 Mar 2026 16:46:56 +0100 Subject: [PATCH 4/4] chore: Add missing permissions --- deploy/helm/hdfs-operator/templates/roles.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/deploy/helm/hdfs-operator/templates/roles.yaml b/deploy/helm/hdfs-operator/templates/roles.yaml index 442e9948..347f4fef 100644 --- a/deploy/helm/hdfs-operator/templates/roles.yaml +++ b/deploy/helm/hdfs-operator/templates/roles.yaml @@ -97,6 +97,9 @@ rules: {{- if .Values.maintenance.customResourceDefinitions.maintain }} - create - patch + # Required for startup condition + - list + - watch {{- end }} - apiGroups: - events.k8s.io