Skip to content

containerdebug: CRD and validation logic - #1308

Open
Maleware wants to merge 12 commits into
mainfrom
spike/containerdebug-switch
Open

Maleware wants to merge 12 commits into
mainfrom
spike/containerdebug-switch

Conversation

@Maleware

@Maleware Maleware commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Description

Core of stackabletech/issues#884

Trino-operator spike

Definition of Done Checklist

  • Not all of these items are applicable to all PRs, the author should update this template to only leave the boxes in that are relevant
  • Please make sure all these things are done and tick the boxes

Author

  • Changes are OpenShift compatible
  • CRD changes approved
  • CRD documentation for all fields, following the style guide.
  • Integration tests passed (for non trivial changes)
  • Changes need to be "offline" compatible

Reviewer

  • Code contains useful comments
  • Code contains useful logging statements
  • (Integration-)Test cases added
  • Documentation added or updated. Follows the style guide.
  • Changelog updated
  • Cargo.toml only contains references to git tags (not specific commits or branches)

Acceptance

  • Feature Tracker has been updated
  • Proper release label has been added

@Maleware Maleware self-assigned this Oct 21, 2026
@Maleware Maleware moved this to Development: In Progress in Stackable Engineering Oct 21, 2026
@Maleware Maleware changed the title containerdebug CRD and validation logic containerdebug: CRD and validation logic Oct 21, 2026
@Maleware
Maleware marked this pull request as ready for review October 29, 2026 12:37
@Maleware Maleware moved this from Development: In Progress to Development: Waiting for Review in Stackable Engineering Oct 29, 2026
@Maleware
Maleware requested a review from Techassi October 29, 2026 13:01
@sbernauer sbernauer moved this from Development: Waiting for Review to Development: In Review in Stackable Engineering Oct 29, 2026

@sbernauer sbernauer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM otherwise

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 {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😢

Suggested change
pub struct ContainerDebugConfig {
pub struct 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 {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😢

Suggested change
pub enum ValidatedContainerDebugConfig {
pub enum ValidatedContainerdebugConfig {

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 {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add this to the CRD preview:

diff --git a/crates/xtask/src/crd/dummy.rs b/crates/xtask/src/crd/dummy.rs
index 67cbbfe1..839ef101 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<Container>,
+
+        #[fragment_attrs(serde(default))]
+        pub containerdebug: stackable_operator::crd::containerdebug::v1alpha1::ContainerDebugConfig,
     }
 
     #[derive(Debug, Default, PartialEq, Fragment, JsonSchema)]


### Added

- Add `crd::containerdebug.rs` module with versioned `ContainerDebugConfig` CRD ([#1308])

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- 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])

Comment on lines +47 to +49
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)."
)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why duplicate it? ;)

Suggested change
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)."
)

@sbernauer

sbernauer commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

@Maleware PR title pls :P

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Development: In Review

Development

Successfully merging this pull request may close these issues.

2 participants