From 48fe5bed5647846bd890dc812c5a5ec0685f060b Mon Sep 17 00:00:00 2001 From: Techassi Date: Tue, 10 Mar 2026 16:40:46 +0100 Subject: [PATCH 1/2] fix: Delay controller startup to avoid 404 in initial list --- Cargo.lock | 22 +++++------ Cargo.nix | 37 +++++++++---------- Cargo.toml | 2 +- crate-hashes.json | 18 ++++----- .../helm/hive-operator/templates/roles.yaml | 3 ++ rust/operator-binary/src/main.rs | 11 ++++-- 6 files changed, 50 insertions(+), 43 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d0041398..3d3523fe 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", @@ -2896,8 +2896,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", @@ -2936,7 +2936,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", @@ -2947,7 +2947,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", @@ -2963,8 +2963,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", @@ -2988,7 +2988,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", @@ -3001,7 +3001,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", @@ -3019,7 +3019,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 c4b5eadf..eaf629fb 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 = "0b4li7f8c118vqgd7gzgd54mmicniawnfkri42pab55qj3kd6mlb"; }; 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 = "0b4li7f8c118vqgd7gzgd54mmicniawnfkri42pab55qj3kd6mlb"; }; libName = "stackable_certs"; @@ -9586,7 +9586,7 @@ rec { { name = "stackable-operator"; packageId = "stackable-operator"; - features = [ "telemetry" "versioned" "webhook" ]; + features = [ "crds" "webhook" ]; } { name = "strum"; @@ -9624,12 +9624,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 = "0b4li7f8c118vqgd7gzgd54mmicniawnfkri42pab55qj3kd6mlb"; }; libName = "stackable_operator"; @@ -9737,12 +9737,11 @@ rec { { name = "stackable-shared"; packageId = "stackable-shared"; - features = [ "time" "jiff" ]; + features = [ "jiff" ]; } { name = "stackable-telemetry"; packageId = "stackable-telemetry"; - optional = true; features = [ "clap" ]; } { @@ -9786,14 +9785,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"; @@ -9802,7 +9801,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "f9b117c8c08557e9774f33145bb009fb74cb2437"; + rev = "7486017f60827d1d769d7bf17bf56adb21f8bb02"; sha256 = "0b4li7f8c118vqgd7gzgd54mmicniawnfkri42pab55qj3kd6mlb"; }; procMacro = true; @@ -9837,7 +9836,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "f9b117c8c08557e9774f33145bb009fb74cb2437"; + rev = "7486017f60827d1d769d7bf17bf56adb21f8bb02"; sha256 = "0b4li7f8c118vqgd7gzgd54mmicniawnfkri42pab55qj3kd6mlb"; }; libName = "stackable_shared"; @@ -9913,12 +9912,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 = "0b4li7f8c118vqgd7gzgd54mmicniawnfkri42pab55qj3kd6mlb"; }; libName = "stackable_telemetry"; @@ -10028,7 +10027,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "f9b117c8c08557e9774f33145bb009fb74cb2437"; + rev = "7486017f60827d1d769d7bf17bf56adb21f8bb02"; sha256 = "0b4li7f8c118vqgd7gzgd54mmicniawnfkri42pab55qj3kd6mlb"; }; libName = "stackable_versioned"; @@ -10072,7 +10071,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "f9b117c8c08557e9774f33145bb009fb74cb2437"; + rev = "7486017f60827d1d769d7bf17bf56adb21f8bb02"; sha256 = "0b4li7f8c118vqgd7gzgd54mmicniawnfkri42pab55qj3kd6mlb"; }; procMacro = true; @@ -10140,7 +10139,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "f9b117c8c08557e9774f33145bb009fb74cb2437"; + rev = "7486017f60827d1d769d7bf17bf56adb21f8bb02"; sha256 = "0b4li7f8c118vqgd7gzgd54mmicniawnfkri42pab55qj3kd6mlb"; }; libName = "stackable_webhook"; diff --git a/Cargo.toml b/Cargo.toml index befc8c19..5973eee8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ repository = "https://github.com/stackabletech/hive-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 54177107..a0f61ac2 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": "0b4li7f8c118vqgd7gzgd54mmicniawnfkri42pab55qj3kd6mlb", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.106.2#stackable-certs@0.4.0": "0b4li7f8c118vqgd7gzgd54mmicniawnfkri42pab55qj3kd6mlb", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.106.2#stackable-operator-derive@0.3.1": "0b4li7f8c118vqgd7gzgd54mmicniawnfkri42pab55qj3kd6mlb", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.106.2#stackable-operator@0.106.2": "0b4li7f8c118vqgd7gzgd54mmicniawnfkri42pab55qj3kd6mlb", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.106.2#stackable-shared@0.1.0": "0b4li7f8c118vqgd7gzgd54mmicniawnfkri42pab55qj3kd6mlb", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.106.2#stackable-telemetry@0.6.1": "0b4li7f8c118vqgd7gzgd54mmicniawnfkri42pab55qj3kd6mlb", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.106.2#stackable-versioned-macros@0.8.3": "0b4li7f8c118vqgd7gzgd54mmicniawnfkri42pab55qj3kd6mlb", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.106.2#stackable-versioned@0.8.3": "0b4li7f8c118vqgd7gzgd54mmicniawnfkri42pab55qj3kd6mlb", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.106.2#stackable-webhook@0.9.0": "0b4li7f8c118vqgd7gzgd54mmicniawnfkri42pab55qj3kd6mlb", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.108.0#k8s-version@0.1.3": "0b4li7f8c118vqgd7gzgd54mmicniawnfkri42pab55qj3kd6mlb", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.108.0#stackable-certs@0.4.0": "0b4li7f8c118vqgd7gzgd54mmicniawnfkri42pab55qj3kd6mlb", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.108.0#stackable-operator-derive@0.3.1": "0b4li7f8c118vqgd7gzgd54mmicniawnfkri42pab55qj3kd6mlb", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.108.0#stackable-operator@0.108.0": "0b4li7f8c118vqgd7gzgd54mmicniawnfkri42pab55qj3kd6mlb", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.108.0#stackable-shared@0.1.0": "0b4li7f8c118vqgd7gzgd54mmicniawnfkri42pab55qj3kd6mlb", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.108.0#stackable-telemetry@0.6.2": "0b4li7f8c118vqgd7gzgd54mmicniawnfkri42pab55qj3kd6mlb", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.108.0#stackable-versioned-macros@0.8.3": "0b4li7f8c118vqgd7gzgd54mmicniawnfkri42pab55qj3kd6mlb", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.108.0#stackable-versioned@0.8.3": "0b4li7f8c118vqgd7gzgd54mmicniawnfkri42pab55qj3kd6mlb", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.108.0#stackable-webhook@0.9.0": "0b4li7f8c118vqgd7gzgd54mmicniawnfkri42pab55qj3kd6mlb", "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/deploy/helm/hive-operator/templates/roles.yaml b/deploy/helm/hive-operator/templates/roles.yaml index 08582326..09b75603 100644 --- a/deploy/helm/hive-operator/templates/roles.yaml +++ b/deploy/helm/hive-operator/templates/roles.yaml @@ -96,6 +96,9 @@ rules: {{- if .Values.maintenance.customResourceDefinitions.maintain }} - create - patch + # Required for startup condition + - list + - watch {{- end }} - apiGroups: - events.k8s.io diff --git a/rust/operator-binary/src/main.rs b/rust/operator-binary/src/main.rs index e5088412..be17c263 100644 --- a/rust/operator-binary/src/main.rs +++ b/rust/operator-binary/src/main.rs @@ -16,7 +16,7 @@ use stackable_operator::{ core::v1::{ConfigMap, Service}, }, kube::{ - ResourceExt, + CustomResourceExt, ResourceExt, core::DeserializeGuard, runtime::{ Controller, @@ -28,7 +28,7 @@ use stackable_operator::{ logging::controller::report_controller_reconciled, shared::yaml::SerializeOptions, telemetry::Tracing, - utils::signal::SignalWatcher, + utils::signal::{self, SignalWatcher}, }; use crate::{ @@ -188,7 +188,12 @@ async fn main() -> anyhow::Result<()> { ) .map(anyhow::Ok); - futures::try_join!(hive_controller, eos_checker, webhook_server)?; + let delayed_hive_controller = async { + signal::crd_established(&client, v1alpha1::HiveCluster::crd_name(), None).await?; + hive_controller.await + }; + + futures::try_join!(delayed_hive_controller, eos_checker, webhook_server)?; } } From 2a70b7bb7d5bccf2f3d4db080eeaad8c70d03af6 Mon Sep 17 00:00:00 2001 From: Techassi Date: Tue, 10 Mar 2026 16:43:24 +0100 Subject: [PATCH 2/2] chore: Add changelog entry --- CHANGELOG.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9fa4a8f6..2573b3b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,11 +15,15 @@ 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 ([#683]). +- Bump stackable-operator to 0.108.0 and strum to 0.28 ([#683], [#685]). - Gracefully shutdown all concurrent tasks by forwarding the SIGTERM signal ([#670]). - Bump testing-tools to `0.3.0-stackable0.0.0-dev` ([#664]). - Deprecate support for `4.1.0` ([#668]). +### Fixed + +- Fix "404 page not found" error for the initial object list ([#685]). + [#652]: https://github.com/stackabletech/hive-operator/pull/652 [#664]: https://github.com/stackabletech/hive-operator/pull/664 [#665]: https://github.com/stackabletech/hive-operator/pull/665 @@ -28,6 +32,7 @@ All notable changes to this project will be documented in this file. [#670]: https://github.com/stackabletech/hive-operator/pull/670 [#676]: https://github.com/stackabletech/hive-operator/pull/676 [#683]: https://github.com/stackabletech/hive-operator/pull/683 +[#685]: https://github.com/stackabletech/hive-operator/pull/685 ## [25.11.0] - 2025-11-07