diff --git a/Cargo.lock b/Cargo.lock index a486f7a7..8243a175 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3012,7 +3012,7 @@ dependencies = [ [[package]] name = "stackable-operator" -version = "0.95.0" +version = "0.95.1" dependencies = [ "chrono", "clap", diff --git a/crates/stackable-operator/CHANGELOG.md b/crates/stackable-operator/CHANGELOG.md index a9ba07d5..06ec6728 100644 --- a/crates/stackable-operator/CHANGELOG.md +++ b/crates/stackable-operator/CHANGELOG.md @@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file. ## [Unreleased] +## [0.95.1] - 2025-08-21 + +### Fixed + +- Derive `Clone` for `ProbeBuilder` and `ProbeAction` ([#1082]). + +[#1082]: https://github.com/stackabletech/operator-rs/pull/1082 + ## [0.95.0] - 2025-08-21 ### Added diff --git a/crates/stackable-operator/Cargo.toml b/crates/stackable-operator/Cargo.toml index e90854b9..5dec6e0a 100644 --- a/crates/stackable-operator/Cargo.toml +++ b/crates/stackable-operator/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "stackable-operator" description = "Stackable Operator Framework" -version = "0.95.0" +version = "0.95.1" authors.workspace = true license.workspace = true edition.workspace = true diff --git a/crates/stackable-operator/src/builder/pod/probe.rs b/crates/stackable-operator/src/builder/pod/probe.rs index cf569b55..7c647e52 100644 --- a/crates/stackable-operator/src/builder/pod/probe.rs +++ b/crates/stackable-operator/src/builder/pod/probe.rs @@ -53,7 +53,7 @@ pub enum Error { PeriodIsZero {}, } -#[derive(Debug)] +#[derive(Clone, Debug)] pub struct ProbeBuilder { // Mandatory field action: Action, @@ -73,6 +73,7 @@ pub struct ProbeBuilder { /// type, see [container-probes] documentation. /// /// [container-probes]: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes +#[derive(Clone, Debug)] pub enum ProbeAction { Exec(ExecAction), Grpc(GRPCAction), @@ -238,6 +239,10 @@ impl ProbeBuilder { Ok(self.with_failure_threshold(failure_threshold.ceil() as i32)) } + /// Build the [`Probe`] using the specified contents. + /// + /// Returns an [`Error::DurationTooLong`] error in case the involved [`Duration`]s are too + /// long. pub fn build(self) -> Result { let mut probe = Probe { exec: None,