From 725b25763eda63a644348686c281fff2fe40ebed Mon Sep 17 00:00:00 2001 From: Maxi Wittich Date: Wed, 21 Oct 2026 16:57:06 +0200 Subject: [PATCH 01/16] containerdebug CRD and validation logic --- .../src/commons/containerdebug.rs | 182 ++++++++++++++++++ crates/stackable-operator/src/commons/mod.rs | 1 + 2 files changed, 183 insertions(+) create mode 100644 crates/stackable-operator/src/commons/containerdebug.rs diff --git a/crates/stackable-operator/src/commons/containerdebug.rs b/crates/stackable-operator/src/commons/containerdebug.rs new file mode 100644 index 000000000..b5ee28d59 --- /dev/null +++ b/crates/stackable-operator/src/commons/containerdebug.rs @@ -0,0 +1,182 @@ +//! Configuration of the `containerdebug` tool, which runs in the background of product containers +//! and periodically logs information about the container environment. +//! +//! Learn more in the +//! [container environment documentation](DOCS_BASE_URL_PLACEHOLDER/concepts/observability/containerdebug). + +use schemars::JsonSchema; +use serde::{Deserialize, Serialize}; +use snafu::{Snafu, ensure}; +use stackable_shared::time::Duration; + +use crate::{ + config::{fragment::Fragment, merge::Merge}, + versioned::versioned, +}; + +/// The interval used if the user does not configure one. +pub const DEFAULT_INTERVAL: Duration = Duration::from_minutes_unchecked(30); + +/// The shortest interval that is accepted. +/// +/// `containerdebug` schedules the next run by adding the interval to the start of the previous +/// one, so an interval of zero would collect (including DNS lookups) in a tight loop. +pub const MINIMUM_INTERVAL: Duration = Duration::from_minutes_unchecked(1); + +#[derive(Debug, Eq, PartialEq, Snafu)] +pub enum Error { + #[snafu(display( + "the containerdebug interval {interval} is shorter than the minimum of {MINIMUM_INTERVAL}" + ))] + IntervalTooShort { interval: Duration }, +} + +#[versioned(version(name = "v1alpha1"))] +pub mod versioned { + /// Configures the `containerdebug` tool, which periodically logs information about the container + /// environment (such as network interfaces, DNS lookups and disk usage) in the background of the + /// product container. + #[derive(Clone, Debug, Eq, Fragment, JsonSchema, PartialEq)] + #[fragment(path_overrides(fragment = "crate::config::fragment"))] + #[fragment_attrs( + derive( + Clone, + Debug, + Default, + Deserialize, + Eq, + JsonSchema, + Merge, + PartialEq, + Serialize + ), + merge(path_overrides(merge = "crate::config::merge")), + serde(rename_all = "camelCase"), + schemars( + description = "Configures the `containerdebug` tool, which periodically logs information about the container environment. Learn more in the [container environment documentation](DOCS_BASE_URL_PLACEHOLDER/concepts/observability/containerdebug)." + ) + )] + pub struct ContainerDebugConfig { + /// Whether `containerdebug` runs in the background of the product container. Defaults to `true`. + pub enabled: bool, + + /// Time between two runs of `containerdebug`, e.g. `30m`, `1h` or `2d`. Must be at least `1m`. + /// Defaults to `30m`. + pub interval: Duration, + } +} + +impl v1alpha1::ContainerDebugConfig { + /// Validates the merged configuration. + /// + /// The interval is only validated if `containerdebug` is enabled, so that a role group can + /// disable it without failing on an interval inherited from its role. + pub fn validate(&self) -> Result { + if !self.enabled { + return Ok(ValidatedContainerDebugConfig::Disabled); + } + + ensure!( + self.interval >= MINIMUM_INTERVAL, + IntervalTooShortSnafu { + interval: self.interval + } + ); + + Ok(ValidatedContainerDebugConfig::Enabled { + interval: self.interval, + }) + } +} + +/// A validated [`ContainerDebugConfig`]. +/// +/// Unlike the user-facing configuration, this cannot carry an interval while `containerdebug` is +/// disabled, nor an interval below [`MINIMUM_INTERVAL`]. +#[derive(Clone, Debug, Eq, PartialEq)] +pub enum ValidatedContainerDebugConfig { + Disabled, + Enabled { interval: Duration }, +} + +impl ValidatedContainerDebugConfig { + /// Returns the shell command which starts `containerdebug` in the background, or [`None`] if + /// it is disabled. + /// + /// The collected state is written as JSON to `containerdebug-state.json` in `log_dir`. + pub fn background_command(&self, log_dir: &str) -> Option { + match self { + Self::Disabled => None, + // `containerdebug` requires the `=` between `--loop` and its value. + Self::Enabled { interval } => Some(format!( + "containerdebug --output={log_dir}/containerdebug-state.json --loop={interval} &" + )), + } + } +} + +/// Returns the default `containerdebug` configuration, which operators merge underneath the +/// role and role group configuration. +pub fn default_containerdebug_config() -> v1alpha1::ContainerDebugConfigFragment { + v1alpha1::ContainerDebugConfigFragment { + enabled: Some(true), + interval: Some(DEFAULT_INTERVAL), + } +} + +#[cfg(test)] +mod tests { + use std::str::FromStr; + + use rstest::rstest; + + use super::*; + use crate::config::fragment; + + const LOG_DIR: &str = "/stackable/log"; + + fn config(enabled: bool, interval: &str) -> v1alpha1::ContainerDebugConfig { + v1alpha1::ContainerDebugConfig { + enabled, + interval: Duration::from_str(interval).expect("valid duration"), + } + } + + #[test] + fn defaults_render_command() { + let config: v1alpha1::ContainerDebugConfig = + fragment::validate(default_containerdebug_config()).expect("defaults are complete"); + + assert_eq!( + config + .validate() + .expect("defaults are valid") + .background_command(LOG_DIR), + Some( + "containerdebug --output=/stackable/log/containerdebug-state.json --loop=30m &" + .to_owned() + ) + ); + } + + #[rstest] + #[case("59s", Err(Error::IntervalTooShort { interval: Duration::from_secs(59) }))] + #[case("1m", Ok(ValidatedContainerDebugConfig::Enabled { interval: MINIMUM_INTERVAL }))] + fn validate_enforces_minimum_interval( + #[case] interval: &str, + #[case] expected: Result, + ) { + assert_eq!(config(true, interval).validate(), expected); + } + + /// A role group can disable `containerdebug` without failing on an interval inherited from + /// its role. + #[test] + fn disabled_ignores_interval_and_renders_nothing() { + let validated = config(false, "0s") + .validate() + .expect("the interval is not validated while disabled"); + + assert_eq!(validated.background_command(LOG_DIR), None); + } +} diff --git a/crates/stackable-operator/src/commons/mod.rs b/crates/stackable-operator/src/commons/mod.rs index cc4ab30e3..63739059a 100644 --- a/crates/stackable-operator/src/commons/mod.rs +++ b/crates/stackable-operator/src/commons/mod.rs @@ -3,6 +3,7 @@ pub mod affinity; pub mod cache; pub mod cluster_operation; +pub mod containerdebug; pub mod networking; pub mod opa; pub mod pdb; From 3dd760cc6a522cbc26a34c82c0f0303775a8e1b5 Mon Sep 17 00:00:00 2001 From: Maxi Wittich Date: Wed, 21 Oct 2026 17:01:45 +0200 Subject: [PATCH 02/16] Add changelog entry --- crates/stackable-operator/CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/stackable-operator/CHANGELOG.md b/crates/stackable-operator/CHANGELOG.md index 4190bd1fa..4656eb9f9 100644 --- a/crates/stackable-operator/CHANGELOG.md +++ b/crates/stackable-operator/CHANGELOG.md @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. ## [Unreleased] +### Added +- Add `commons::containerdebug.rs` module with versioned `ContainerDebugConfig` CRD ([#1308]) + +[#1308]https://github.com/stackabletech/operator-rs/pull/1308 + ## [0.121.0] - 2026-10-14 ### Changed From 6e64b742e82f549e20b774eb57f1af9dbffc025f Mon Sep 17 00:00:00 2001 From: Maxi Wittich Date: Wed, 21 Oct 2026 17:17:14 +0200 Subject: [PATCH 03/16] Moving containerdebug to stackable-operator/src/crd --- crates/stackable-operator/src/commons/mod.rs | 1 - .../{commons/containerdebug.rs => crd/containerdebug/mod.rs} | 2 +- crates/stackable-operator/src/crd/mod.rs | 1 + 3 files changed, 2 insertions(+), 2 deletions(-) rename crates/stackable-operator/src/{commons/containerdebug.rs => crd/containerdebug/mod.rs} (99%) diff --git a/crates/stackable-operator/src/commons/mod.rs b/crates/stackable-operator/src/commons/mod.rs index 63739059a..cc4ab30e3 100644 --- a/crates/stackable-operator/src/commons/mod.rs +++ b/crates/stackable-operator/src/commons/mod.rs @@ -3,7 +3,6 @@ pub mod affinity; pub mod cache; pub mod cluster_operation; -pub mod containerdebug; pub mod networking; pub mod opa; pub mod pdb; diff --git a/crates/stackable-operator/src/commons/containerdebug.rs b/crates/stackable-operator/src/crd/containerdebug/mod.rs similarity index 99% rename from crates/stackable-operator/src/commons/containerdebug.rs rename to crates/stackable-operator/src/crd/containerdebug/mod.rs index b5ee28d59..78d10dcb9 100644 --- a/crates/stackable-operator/src/commons/containerdebug.rs +++ b/crates/stackable-operator/src/crd/containerdebug/mod.rs @@ -89,7 +89,7 @@ impl v1alpha1::ContainerDebugConfig { } } -/// A validated [`ContainerDebugConfig`]. +/// A validated [`v1alpha1::ContainerDebugConfig`]. /// /// Unlike the user-facing configuration, this cannot carry an interval while `containerdebug` is /// disabled, nor an interval below [`MINIMUM_INTERVAL`]. diff --git a/crates/stackable-operator/src/crd/mod.rs b/crates/stackable-operator/src/crd/mod.rs index 48681601c..35513616a 100644 --- a/crates/stackable-operator/src/crd/mod.rs +++ b/crates/stackable-operator/src/crd/mod.rs @@ -5,6 +5,7 @@ use schemars::JsonSchema; use serde::{Deserialize, Serialize}; pub mod authentication; +pub mod containerdebug; pub mod git_sync; pub mod listener; pub mod openlineage; From ad1773a20e5351c8e83933b92e5e0c7fbbda9f5b Mon Sep 17 00:00:00 2001 From: Maxi Wittich Date: Fri, 23 Oct 2026 10:09:57 +0200 Subject: [PATCH 04/16] fixing changelog --- crates/stackable-operator/CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/stackable-operator/CHANGELOG.md b/crates/stackable-operator/CHANGELOG.md index 4656eb9f9..3fe005170 100644 --- a/crates/stackable-operator/CHANGELOG.md +++ b/crates/stackable-operator/CHANGELOG.md @@ -5,7 +5,8 @@ All notable changes to this project will be documented in this file. ## [Unreleased] ### Added -- Add `commons::containerdebug.rs` module with versioned `ContainerDebugConfig` CRD ([#1308]) + +- Add `crd::containerdebug.rs` module with versioned `ContainerDebugConfig` CRD ([#1308]) [#1308]https://github.com/stackabletech/operator-rs/pull/1308 From e14da98ede24c9c211b0390382ef8055a0465b25 Mon Sep 17 00:00:00 2001 From: Maxi Wittich Date: Fri, 23 Oct 2026 10:22:12 +0200 Subject: [PATCH 05/16] Formatting --- crates/stackable-operator/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/stackable-operator/CHANGELOG.md b/crates/stackable-operator/CHANGELOG.md index 3fe005170..e017eee8c 100644 --- a/crates/stackable-operator/CHANGELOG.md +++ b/crates/stackable-operator/CHANGELOG.md @@ -8,7 +8,7 @@ All notable changes to this project will be documented in this file. - Add `crd::containerdebug.rs` module with versioned `ContainerDebugConfig` CRD ([#1308]) -[#1308]https://github.com/stackabletech/operator-rs/pull/1308 +[#1308]: https://github.com/stackabletech/operator-rs/pull/1308 ## [0.121.0] - 2026-10-14 From ca0f55d33dbf8cd7bcc26ad86382bbf27c3b600b Mon Sep 17 00:00:00 2001 From: Maxi Wittich Date: Thu, 29 Oct 2026 12:59:33 +0100 Subject: [PATCH 06/16] update to interval non 0 --- .../src/crd/containerdebug/mod.rs | 31 ++++++------------- 1 file changed, 10 insertions(+), 21 deletions(-) diff --git a/crates/stackable-operator/src/crd/containerdebug/mod.rs b/crates/stackable-operator/src/crd/containerdebug/mod.rs index 78d10dcb9..5c1239bdd 100644 --- a/crates/stackable-operator/src/crd/containerdebug/mod.rs +++ b/crates/stackable-operator/src/crd/containerdebug/mod.rs @@ -17,18 +17,10 @@ use crate::{ /// The interval used if the user does not configure one. pub const DEFAULT_INTERVAL: Duration = Duration::from_minutes_unchecked(30); -/// The shortest interval that is accepted. -/// -/// `containerdebug` schedules the next run by adding the interval to the start of the previous -/// one, so an interval of zero would collect (including DNS lookups) in a tight loop. -pub const MINIMUM_INTERVAL: Duration = Duration::from_minutes_unchecked(1); - #[derive(Debug, Eq, PartialEq, Snafu)] pub enum Error { - #[snafu(display( - "the containerdebug interval {interval} is shorter than the minimum of {MINIMUM_INTERVAL}" - ))] - IntervalTooShort { interval: Duration }, + #[snafu(display("the containerdebug interval must not be zero"))] + IntervalZero, } #[versioned(version(name = "v1alpha1"))] @@ -60,7 +52,7 @@ pub mod versioned { /// Whether `containerdebug` runs in the background of the product container. Defaults to `true`. pub enabled: bool, - /// Time between two runs of `containerdebug`, e.g. `30m`, `1h` or `2d`. Must be at least `1m`. + /// Time between two runs of `containerdebug`, e.g. `30m`, `1h` or `2d`. Must not be zero. /// Defaults to `30m`. pub interval: Duration, } @@ -76,12 +68,9 @@ impl v1alpha1::ContainerDebugConfig { return Ok(ValidatedContainerDebugConfig::Disabled); } - ensure!( - self.interval >= MINIMUM_INTERVAL, - IntervalTooShortSnafu { - interval: self.interval - } - ); + // `containerdebug` schedules the next run by adding the interval to the start of the + // previous one, so an interval of zero would collect (including DNS lookups) in a tight loop. + ensure!(!self.interval.is_zero(), IntervalZeroSnafu); Ok(ValidatedContainerDebugConfig::Enabled { interval: self.interval, @@ -92,7 +81,7 @@ impl v1alpha1::ContainerDebugConfig { /// A validated [`v1alpha1::ContainerDebugConfig`]. /// /// Unlike the user-facing configuration, this cannot carry an interval while `containerdebug` is -/// disabled, nor an interval below [`MINIMUM_INTERVAL`]. +/// disabled, nor an interval of zero. #[derive(Clone, Debug, Eq, PartialEq)] pub enum ValidatedContainerDebugConfig { Disabled, @@ -160,9 +149,9 @@ mod tests { } #[rstest] - #[case("59s", Err(Error::IntervalTooShort { interval: Duration::from_secs(59) }))] - #[case("1m", Ok(ValidatedContainerDebugConfig::Enabled { interval: MINIMUM_INTERVAL }))] - fn validate_enforces_minimum_interval( + #[case("0s", Err(Error::IntervalZero))] + #[case("1s", Ok(ValidatedContainerDebugConfig::Enabled { interval: Duration::from_secs(1) }))] + fn validate_rejects_zero_interval( #[case] interval: &str, #[case] expected: Result, ) { From cf8f955ff8e7e18324b5af8463e51da3d11f18f1 Mon Sep 17 00:00:00 2001 From: Maxi Wittich Date: Thu, 29 Oct 2026 13:22:00 +0100 Subject: [PATCH 07/16] fix Changelog --- crates/stackable-operator/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/stackable-operator/CHANGELOG.md b/crates/stackable-operator/CHANGELOG.md index 9c9fbeb3f..9582e4af1 100644 --- a/crates/stackable-operator/CHANGELOG.md +++ b/crates/stackable-operator/CHANGELOG.md @@ -9,6 +9,7 @@ All notable changes to this project will be documented in this file. - Add `crd::containerdebug.rs` module with versioned `ContainerDebugConfig` CRD ([#1308]) [#1308]: https://github.com/stackabletech/operator-rs/pull/1308 + ### Changed - BREAKING: Bump the RustCrypto dependencies to their new generation, which affects the re-exported From d61d980bb1fb4e703e30f76ea8ff75ae38d26cd8 Mon Sep 17 00:00:00 2001 From: Maximilian Wittich <56642549+Maleware@users.noreply.github.com> Date: Fri, 30 Oct 2026 08:55:20 +0100 Subject: [PATCH 08/16] Apply code review (typos etc) Co-authored-by: Sebastian Bernauer --- crates/stackable-operator/CHANGELOG.md | 2 +- crates/stackable-operator/src/crd/containerdebug/mod.rs | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/crates/stackable-operator/CHANGELOG.md b/crates/stackable-operator/CHANGELOG.md index 9582e4af1..53bc0d2e1 100644 --- a/crates/stackable-operator/CHANGELOG.md +++ b/crates/stackable-operator/CHANGELOG.md @@ -6,7 +6,7 @@ All notable changes to this project will be documented in this file. ### Added -- Add `crd::containerdebug.rs` module with versioned `ContainerDebugConfig` CRD ([#1308]) +- Add `crd::containerdebug.rs` module with the `ContainerdebugConfig` CRD struct as well as helper functions on `ValidatedContainerdebugConfig` ([#1308]) [#1308]: https://github.com/stackabletech/operator-rs/pull/1308 diff --git a/crates/stackable-operator/src/crd/containerdebug/mod.rs b/crates/stackable-operator/src/crd/containerdebug/mod.rs index 5c1239bdd..425bbdf41 100644 --- a/crates/stackable-operator/src/crd/containerdebug/mod.rs +++ b/crates/stackable-operator/src/crd/containerdebug/mod.rs @@ -44,11 +44,8 @@ pub mod versioned { ), merge(path_overrides(merge = "crate::config::merge")), serde(rename_all = "camelCase"), - schemars( - description = "Configures the `containerdebug` tool, which periodically logs information about the container environment. Learn more in the [container environment documentation](DOCS_BASE_URL_PLACEHOLDER/concepts/observability/containerdebug)." - ) )] - pub struct ContainerDebugConfig { + pub struct ContainerdebugConfig { /// Whether `containerdebug` runs in the background of the product container. Defaults to `true`. pub enabled: bool, @@ -83,7 +80,7 @@ impl v1alpha1::ContainerDebugConfig { /// Unlike the user-facing configuration, this cannot carry an interval while `containerdebug` is /// disabled, nor an interval of zero. #[derive(Clone, Debug, Eq, PartialEq)] -pub enum ValidatedContainerDebugConfig { +pub enum ValidatedContainerdebugConfig { Disabled, Enabled { interval: Duration }, } From 20418d2588ed1db4b400288254e441a676a55e69 Mon Sep 17 00:00:00 2001 From: Maxi Wittich Date: Fri, 30 Oct 2026 09:16:55 +0100 Subject: [PATCH 09/16] Removing Debug from struct ContainerDebugConfig --- crates/stackable-operator/src/crd/containerdebug/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/stackable-operator/src/crd/containerdebug/mod.rs b/crates/stackable-operator/src/crd/containerdebug/mod.rs index 5c1239bdd..35951e041 100644 --- a/crates/stackable-operator/src/crd/containerdebug/mod.rs +++ b/crates/stackable-operator/src/crd/containerdebug/mod.rs @@ -28,7 +28,7 @@ pub mod versioned { /// Configures the `containerdebug` tool, which periodically logs information about the container /// environment (such as network interfaces, DNS lookups and disk usage) in the background of the /// product container. - #[derive(Clone, Debug, Eq, Fragment, JsonSchema, PartialEq)] + #[derive(Clone, Eq, Fragment, JsonSchema, PartialEq)] #[fragment(path_overrides(fragment = "crate::config::fragment"))] #[fragment_attrs( derive( From 7342fc5895ad6c4e74b833d2d8b9444e47baa6b7 Mon Sep 17 00:00:00 2001 From: Maxi Wittich Date: Fri, 30 Oct 2026 09:31:55 +0100 Subject: [PATCH 10/16] rename to ContainerdebugConfig --- .../src/crd/containerdebug/mod.rs | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/crates/stackable-operator/src/crd/containerdebug/mod.rs b/crates/stackable-operator/src/crd/containerdebug/mod.rs index b7958a4a6..5db67371c 100644 --- a/crates/stackable-operator/src/crd/containerdebug/mod.rs +++ b/crates/stackable-operator/src/crd/containerdebug/mod.rs @@ -55,21 +55,21 @@ pub mod versioned { } } -impl v1alpha1::ContainerDebugConfig { +impl v1alpha1::ContainerdebugConfig { /// Validates the merged configuration. /// /// The interval is only validated if `containerdebug` is enabled, so that a role group can /// disable it without failing on an interval inherited from its role. - pub fn validate(&self) -> Result { + pub fn validate(&self) -> Result { if !self.enabled { - return Ok(ValidatedContainerDebugConfig::Disabled); + return Ok(ValidatedContainerdebugConfig::Disabled); } // `containerdebug` schedules the next run by adding the interval to the start of the // previous one, so an interval of zero would collect (including DNS lookups) in a tight loop. ensure!(!self.interval.is_zero(), IntervalZeroSnafu); - Ok(ValidatedContainerDebugConfig::Enabled { + Ok(ValidatedContainerdebugConfig::Enabled { interval: self.interval, }) } @@ -85,7 +85,7 @@ pub enum ValidatedContainerdebugConfig { Enabled { interval: Duration }, } -impl ValidatedContainerDebugConfig { +impl ValidatedContainerdebugConfig { /// Returns the shell command which starts `containerdebug` in the background, or [`None`] if /// it is disabled. /// @@ -103,8 +103,8 @@ impl ValidatedContainerDebugConfig { /// Returns the default `containerdebug` configuration, which operators merge underneath the /// role and role group configuration. -pub fn default_containerdebug_config() -> v1alpha1::ContainerDebugConfigFragment { - v1alpha1::ContainerDebugConfigFragment { +pub fn default_containerdebug_config() -> v1alpha1::ContainerdebugConfigFragment { + v1alpha1::ContainerdebugConfigFragment { enabled: Some(true), interval: Some(DEFAULT_INTERVAL), } @@ -121,8 +121,8 @@ mod tests { const LOG_DIR: &str = "/stackable/log"; - fn config(enabled: bool, interval: &str) -> v1alpha1::ContainerDebugConfig { - v1alpha1::ContainerDebugConfig { + fn config(enabled: bool, interval: &str) -> v1alpha1::ContainerdebugConfig { + v1alpha1::ContainerdebugConfig { enabled, interval: Duration::from_str(interval).expect("valid duration"), } @@ -130,7 +130,7 @@ mod tests { #[test] fn defaults_render_command() { - let config: v1alpha1::ContainerDebugConfig = + let config: v1alpha1::ContainerdebugConfig = fragment::validate(default_containerdebug_config()).expect("defaults are complete"); assert_eq!( @@ -147,10 +147,10 @@ mod tests { #[rstest] #[case("0s", Err(Error::IntervalZero))] - #[case("1s", Ok(ValidatedContainerDebugConfig::Enabled { interval: Duration::from_secs(1) }))] + #[case("1s", Ok(ValidatedContainerdebugConfig::Enabled { interval: Duration::from_secs(1) }))] fn validate_rejects_zero_interval( #[case] interval: &str, - #[case] expected: Result, + #[case] expected: Result, ) { assert_eq!(config(true, interval).validate(), expected); } From 4feff0dd4dd319c5fb260452874cfeb4cf065618 Mon Sep 17 00:00:00 2001 From: Maxi Wittich Date: Fri, 30 Oct 2026 09:44:14 +0100 Subject: [PATCH 11/16] correct cargodocs --- crates/stackable-operator/src/crd/containerdebug/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/stackable-operator/src/crd/containerdebug/mod.rs b/crates/stackable-operator/src/crd/containerdebug/mod.rs index 5db67371c..95c308c84 100644 --- a/crates/stackable-operator/src/crd/containerdebug/mod.rs +++ b/crates/stackable-operator/src/crd/containerdebug/mod.rs @@ -75,7 +75,7 @@ impl v1alpha1::ContainerdebugConfig { } } -/// A validated [`v1alpha1::ContainerDebugConfig`]. +/// A validated [`v1alpha1::ContainerdebugConfig`]. /// /// Unlike the user-facing configuration, this cannot carry an interval while `containerdebug` is /// disabled, nor an interval of zero. From 9831334697cbcc0a49ec5a58282fa90ac18d1a0d Mon Sep 17 00:00:00 2001 From: Maxi Wittich Date: Fri, 30 Oct 2026 09:57:57 +0100 Subject: [PATCH 12/16] rustfmt --- crates/stackable-operator/src/crd/containerdebug/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/stackable-operator/src/crd/containerdebug/mod.rs b/crates/stackable-operator/src/crd/containerdebug/mod.rs index 95c308c84..7300cfdb7 100644 --- a/crates/stackable-operator/src/crd/containerdebug/mod.rs +++ b/crates/stackable-operator/src/crd/containerdebug/mod.rs @@ -43,7 +43,7 @@ pub mod versioned { Serialize ), merge(path_overrides(merge = "crate::config::merge")), - serde(rename_all = "camelCase"), + serde(rename_all = "camelCase") )] pub struct ContainerdebugConfig { /// Whether `containerdebug` runs in the background of the product container. Defaults to `true`. From 09f703e6e9dd0ecf1c020814093ea29fec023a06 Mon Sep 17 00:00:00 2001 From: Maxi Wittich Date: Fri, 30 Oct 2026 11:15:52 +0100 Subject: [PATCH 13/16] Add crds to dummy.rs --- crates/xtask/src/crd/dummy.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/xtask/src/crd/dummy.rs b/crates/xtask/src/crd/dummy.rs index 67cbbfe11..b909dbc22 100644 --- a/crates/xtask/src/crd/dummy.rs +++ b/crates/xtask/src/crd/dummy.rs @@ -117,7 +117,7 @@ pub mod versioned { >, } - #[derive(Debug, Default, PartialEq, Fragment, JsonSchema)] + #[derive(Debug, PartialEq, Fragment, JsonSchema)] #[fragment_attrs( derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize, JsonSchema), schemars(crate = "stackable_operator::schemars"), @@ -130,6 +130,9 @@ pub mod versioned { #[fragment_attrs(serde(default))] pub logging: stackable_operator::product_logging::spec::Logging, + + #[fragment_attrs(serde(default))] + pub containerdebug: stackable_operator::crd::containerdebug::v1alpha1::ContainerDebugConfig, } #[derive(Debug, Default, PartialEq, Fragment, JsonSchema)] From 24f1b97010043b1215e739d1ea98f936c26a2045 Mon Sep 17 00:00:00 2001 From: Maxi Wittich Date: Fri, 30 Oct 2026 11:20:29 +0100 Subject: [PATCH 14/16] fix typo --- crates/xtask/src/crd/dummy.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/xtask/src/crd/dummy.rs b/crates/xtask/src/crd/dummy.rs index b909dbc22..6c4c9e1b6 100644 --- a/crates/xtask/src/crd/dummy.rs +++ b/crates/xtask/src/crd/dummy.rs @@ -132,7 +132,7 @@ pub mod versioned { pub logging: stackable_operator::product_logging::spec::Logging, #[fragment_attrs(serde(default))] - pub containerdebug: stackable_operator::crd::containerdebug::v1alpha1::ContainerDebugConfig, + pub containerdebug: stackable_operator::crd::containerdebug::v1alpha1::ContainerdebugConfig, } #[derive(Debug, Default, PartialEq, Fragment, JsonSchema)] From ca4c6a775f7a2a7b407bb4c3cf874da545b3aa9d Mon Sep 17 00:00:00 2001 From: Maxi Wittich Date: Fri, 30 Oct 2026 11:24:15 +0100 Subject: [PATCH 15/16] add debug again --- crates/stackable-operator/src/crd/containerdebug/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/stackable-operator/src/crd/containerdebug/mod.rs b/crates/stackable-operator/src/crd/containerdebug/mod.rs index 7300cfdb7..6ed39c1f9 100644 --- a/crates/stackable-operator/src/crd/containerdebug/mod.rs +++ b/crates/stackable-operator/src/crd/containerdebug/mod.rs @@ -28,7 +28,7 @@ pub mod versioned { /// Configures the `containerdebug` tool, which periodically logs information about the container /// environment (such as network interfaces, DNS lookups and disk usage) in the background of the /// product container. - #[derive(Clone, Eq, Fragment, JsonSchema, PartialEq)] + #[derive(Clone, Debug, Eq, Fragment, JsonSchema, PartialEq)] #[fragment(path_overrides(fragment = "crate::config::fragment"))] #[fragment_attrs( derive( From d7d661b13021fcd0fd670be17bda848d957ede76 Mon Sep 17 00:00:00 2001 From: Maxi Wittich Date: Fri, 30 Oct 2026 11:30:26 +0100 Subject: [PATCH 16/16] regenerate dummy crds --- .../stackable-operator/crds/DummyCluster.yaml | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/crates/stackable-operator/crds/DummyCluster.yaml b/crates/stackable-operator/crds/DummyCluster.yaml index 0f3a96838..555c1c2b7 100644 --- a/crates/stackable-operator/crds/DummyCluster.yaml +++ b/crates/stackable-operator/crds/DummyCluster.yaml @@ -435,6 +435,26 @@ spec: config: default: {} properties: + containerdebug: + default: + enabled: null + interval: null + description: |- + Configures the `containerdebug` tool, which periodically logs information about the container + environment (such as network interfaces, DNS lookups and disk usage) in the background of the + product container. + properties: + enabled: + description: Whether `containerdebug` runs in the background of the product container. Defaults to `true`. + nullable: true + type: boolean + interval: + description: |- + Time between two runs of `containerdebug`, e.g. `30m`, `1h` or `2d`. Must not be zero. + Defaults to `30m`. + nullable: true + type: string + type: object logging: default: containers: {} @@ -1114,6 +1134,26 @@ spec: config: default: {} properties: + containerdebug: + default: + enabled: null + interval: null + description: |- + Configures the `containerdebug` tool, which periodically logs information about the container + environment (such as network interfaces, DNS lookups and disk usage) in the background of the + product container. + properties: + enabled: + description: Whether `containerdebug` runs in the background of the product container. Defaults to `true`. + nullable: true + type: boolean + interval: + description: |- + Time between two runs of `containerdebug`, e.g. `30m`, `1h` or `2d`. Must not be zero. + Defaults to `30m`. + nullable: true + type: string + type: object logging: default: containers: {}