diff --git a/CHANGELOG.md b/CHANGELOG.md index 85211982..688db996 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,7 +13,7 @@ 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 ([#373]). +- Bump stackable-operator to 0.108.0 and strum to 0.28 ([#373], [#375]). - The operator now deploys the selected ListenerClass preset instead of relying on Helm ([#369]). - This mechanism is currently tied to CRD maintenance. - Gracefully shutdown all concurrent tasks by forwarding the SIGTERM signal ([#366]). @@ -23,6 +23,10 @@ All notable changes to this project will be documented in this file. This behaviour is in line with the default behaviour of Helm and OLM. - Bump testing-tools to `0.3.0-stackable0.0.0-dev` ([#363]). +### Fixed + +- Fix "404 page not found" error for the initial object list ([#375]). + [#360]: https://github.com/stackabletech/listener-operator/pull/360 [#363]: https://github.com/stackabletech/listener-operator/pull/363 [#364]: https://github.com/stackabletech/listener-operator/pull/364 @@ -31,6 +35,7 @@ All notable changes to this project will be documented in this file. [#368]: https://github.com/stackabletech/listener-operator/pull/368 [#369]: https://github.com/stackabletech/listener-operator/pull/369 [#373]: https://github.com/stackabletech/listener-operator/pull/373 +[#375]: https://github.com/stackabletech/listener-operator/pull/375 ## [25.11.0] - 2025-11-07 diff --git a/Cargo.lock b/Cargo.lock index 5dfd3f70..61e0ef11 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1544,7 +1544,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", @@ -2948,7 +2948,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", @@ -3014,8 +3014,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", @@ -3054,7 +3054,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", @@ -3065,7 +3065,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", @@ -3081,8 +3081,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", @@ -3106,7 +3106,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", @@ -3119,7 +3119,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", @@ -3137,7 +3137,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 00e483f0..3128bffa 100644 --- a/Cargo.nix +++ b/Cargo.nix @@ -4983,8 +4983,8 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "f9b117c8c08557e9774f33145bb009fb74cb2437"; - sha256 = "0yxp9d7x3xzlc7i67mjkizf587hvx8kwjly9p10x320hvp91qf17"; + rev = "7486017f60827d1d769d7bf17bf56adb21f8bb02"; + sha256 = "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2"; }; libName = "k8s_version"; authors = [ @@ -9886,8 +9886,8 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "f9b117c8c08557e9774f33145bb009fb74cb2437"; - sha256 = "0yxp9d7x3xzlc7i67mjkizf587hvx8kwjly9p10x320hvp91qf17"; + rev = "7486017f60827d1d769d7bf17bf56adb21f8bb02"; + sha256 = "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2"; }; libName = "stackable_certs"; authors = [ @@ -10054,7 +10054,7 @@ rec { { name = "stackable-operator"; packageId = "stackable-operator"; - features = [ "telemetry" "versioned" "webhook" ]; + features = [ "crds" "webhook" ]; } { name = "strum"; @@ -10132,7 +10132,7 @@ rec { { name = "stackable-operator"; packageId = "stackable-operator"; - features = [ "telemetry" "versioned" "webhook" ]; + features = [ "crds" "webhook" ]; } { name = "tokio"; @@ -10159,13 +10159,13 @@ 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"; - sha256 = "0yxp9d7x3xzlc7i67mjkizf587hvx8kwjly9p10x320hvp91qf17"; + rev = "7486017f60827d1d769d7bf17bf56adb21f8bb02"; + sha256 = "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2"; }; libName = "stackable_operator"; authors = [ @@ -10272,12 +10272,11 @@ rec { { name = "stackable-shared"; packageId = "stackable-shared"; - features = [ "time" "jiff" ]; + features = [ "jiff" ]; } { name = "stackable-telemetry"; packageId = "stackable-telemetry"; - optional = true; features = [ "clap" ]; } { @@ -10321,14 +10320,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"; @@ -10337,8 +10336,8 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "f9b117c8c08557e9774f33145bb009fb74cb2437"; - sha256 = "0yxp9d7x3xzlc7i67mjkizf587hvx8kwjly9p10x320hvp91qf17"; + rev = "7486017f60827d1d769d7bf17bf56adb21f8bb02"; + sha256 = "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2"; }; procMacro = true; libName = "stackable_operator_derive"; @@ -10372,8 +10371,8 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "f9b117c8c08557e9774f33145bb009fb74cb2437"; - sha256 = "0yxp9d7x3xzlc7i67mjkizf587hvx8kwjly9p10x320hvp91qf17"; + rev = "7486017f60827d1d769d7bf17bf56adb21f8bb02"; + sha256 = "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2"; }; libName = "stackable_shared"; authors = [ @@ -10448,13 +10447,13 @@ 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"; - sha256 = "0yxp9d7x3xzlc7i67mjkizf587hvx8kwjly9p10x320hvp91qf17"; + rev = "7486017f60827d1d769d7bf17bf56adb21f8bb02"; + sha256 = "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2"; }; libName = "stackable_telemetry"; authors = [ @@ -10563,8 +10562,8 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "f9b117c8c08557e9774f33145bb009fb74cb2437"; - sha256 = "0yxp9d7x3xzlc7i67mjkizf587hvx8kwjly9p10x320hvp91qf17"; + rev = "7486017f60827d1d769d7bf17bf56adb21f8bb02"; + sha256 = "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2"; }; libName = "stackable_versioned"; authors = [ @@ -10607,8 +10606,8 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "f9b117c8c08557e9774f33145bb009fb74cb2437"; - sha256 = "0yxp9d7x3xzlc7i67mjkizf587hvx8kwjly9p10x320hvp91qf17"; + rev = "7486017f60827d1d769d7bf17bf56adb21f8bb02"; + sha256 = "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2"; }; procMacro = true; libName = "stackable_versioned_macros"; @@ -10675,8 +10674,8 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "f9b117c8c08557e9774f33145bb009fb74cb2437"; - sha256 = "0yxp9d7x3xzlc7i67mjkizf587hvx8kwjly9p10x320hvp91qf17"; + rev = "7486017f60827d1d769d7bf17bf56adb21f8bb02"; + sha256 = "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2"; }; libName = "stackable_webhook"; authors = [ diff --git a/Cargo.toml b/Cargo.toml index 412aee49..76eee306 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,9 +10,8 @@ edition = "2021" repository = "https://github.com/stackabletech/listener-operator" [workspace.dependencies] -stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "stackable-operator-0.106.2", features = [ - "telemetry", - "versioned", +stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "stackable-operator-0.108.0", features = [ + "crds", "webhook", ] } diff --git a/crate-hashes.json b/crate-hashes.json index 0ec63dc5..2148b36f 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": "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.108.0#stackable-certs@0.4.0": "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.108.0#stackable-operator-derive@0.3.1": "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.108.0#stackable-operator@0.108.0": "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.108.0#stackable-shared@0.1.0": "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.108.0#stackable-telemetry@0.6.2": "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.108.0#stackable-versioned-macros@0.8.3": "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.108.0#stackable-versioned@0.8.3": "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.108.0#stackable-webhook@0.9.0": "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2", "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/listener-operator/templates/roles.yaml b/deploy/helm/listener-operator/templates/roles.yaml index 4fde4305..03b75dad 100644 --- a/deploy/helm/listener-operator/templates/roles.yaml +++ b/deploy/helm/listener-operator/templates/roles.yaml @@ -158,4 +158,7 @@ rules: verbs: - create - patch + # Required for startup condition + - list + - watch {{ end }} diff --git a/rust/olm-deployer/src/env/mod.rs b/rust/olm-deployer/src/env/mod.rs index e3d86342..612afa50 100644 --- a/rust/olm-deployer/src/env/mod.rs +++ b/rust/olm-deployer/src/env/mod.rs @@ -62,8 +62,7 @@ fn deployer_env_var(deployment: &Deployment) -> Option<&Vec> { .as_ref()? .containers .iter() - .filter(|c| c.name == "listener-operator-deployer") - .next_back()? + .rfind(|c| c.name == "listener-operator-deployer")? .env .as_ref() } diff --git a/rust/olm-deployer/src/resources/mod.rs b/rust/olm-deployer/src/resources/mod.rs index c53c53b8..b1c6e35a 100644 --- a/rust/olm-deployer/src/resources/mod.rs +++ b/rust/olm-deployer/src/resources/mod.rs @@ -44,8 +44,7 @@ fn deployment_resources(deployment: &Deployment) -> Option<&ResourceRequirements .as_ref()? .containers .iter() - .filter(|c| c.name == "listener-operator-deployer") - .next_back()? + .rfind(|c| c.name == "listener-operator-deployer")? .resources .as_ref() } diff --git a/rust/operator-binary/src/listener_controller.rs b/rust/operator-binary/src/listener_controller.rs index 67d20d81..75d81928 100644 --- a/rust/operator-binary/src/listener_controller.rs +++ b/rust/operator-binary/src/listener_controller.rs @@ -124,17 +124,11 @@ where }, ) .graceful_shutdown_on(shutdown_signal) - .run( - reconcile, - error_policy, - Arc::new(Ctx { - client: client.clone(), - }), - ) + .run(reconcile, error_policy, Arc::new(Ctx { client })) // We can let the reporting happen in the background .for_each_concurrent( 16, // concurrency limit - |result| { + move |result| { // The event_recorder needs to be shared across all invocations, so that // events are correctly aggregated let event_recorder = event_recorder.clone(); diff --git a/rust/operator-binary/src/main.rs b/rust/operator-binary/src/main.rs index fecb79bf..437b29d8 100644 --- a/rust/operator-binary/src/main.rs +++ b/rust/operator-binary/src/main.rs @@ -22,10 +22,10 @@ use stackable_operator::{ PodListenersVersion, v1alpha1, }, eos::EndOfSupportChecker, - kube::ResourceExt, + kube::{CustomResourceExt, ResourceExt}, shared::yaml::SerializeOptions, telemetry::Tracing, - utils::signal::SignalWatcher, + utils::signal::{self, SignalWatcher}, }; use tokio::sync::oneshot; use tokio_stream::wrappers::UnixListenerStream; @@ -211,14 +211,21 @@ async fn main() -> anyhow::Result<()> { .map_err(|err| anyhow!(err).context("failed to run csi server")); let controller = - listener_controller::run(client, sigterm_watcher.handle()).map(anyhow::Ok); + listener_controller::run(client.clone(), sigterm_watcher.handle()) + .map(anyhow::Ok); + + let delayed_controller = async { + signal::crd_established(&client, v1alpha1::Listener::crd_name(), None) + .await?; + controller.await + }; futures::try_join!( + delayed_controller, listener_classes, webhook_server, eos_checker, csi_server, - controller, )?; } RunMode::Node => {