diff --git a/Cargo.lock b/Cargo.lock index ea6c36fe4..583a58abf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2879,7 +2879,7 @@ dependencies = [ [[package]] name = "stackable-operator" -version = "0.101.0" +version = "0.101.1" dependencies = [ "chrono", "clap", diff --git a/crates/stackable-operator/CHANGELOG.md b/crates/stackable-operator/CHANGELOG.md index 7b150c4ae..32adca252 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.101.1] - 2025-12-23 + +### Fixed + +- BREAKING: Only take `object_overrides` by reference in `ClusterResources::new` ([#1132]). + +[#1132]: https://github.com/stackabletech/operator-rs/pull/1132 + ## [0.101.0] - 2025-12-23 ### Added diff --git a/crates/stackable-operator/Cargo.toml b/crates/stackable-operator/Cargo.toml index b2d25152b..6e6fd7edc 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.101.0" +version = "0.101.1" authors.workspace = true license.workspace = true edition.workspace = true diff --git a/crates/stackable-operator/src/cluster_resources.rs b/crates/stackable-operator/src/cluster_resources.rs index da3ee1bcf..e159f9cf2 100644 --- a/crates/stackable-operator/src/cluster_resources.rs +++ b/crates/stackable-operator/src/cluster_resources.rs @@ -381,7 +381,7 @@ impl ClusterResource for Deployment { /// CONTROLLER_NAME, /// &app.object_ref(&()), /// ClusterResourceApplyStrategy::Default, -/// app.spec.object_overrides.clone(), +/// &app.spec.object_overrides, /// ) /// .map_err(|source| Error::CreateClusterResources { source })?; /// @@ -428,7 +428,7 @@ impl ClusterResource for Deployment { /// } /// ``` #[derive(Debug, PartialEq)] -pub struct ClusterResources { +pub struct ClusterResources<'a> { /// The namespace of the cluster namespace: String, @@ -458,10 +458,10 @@ pub struct ClusterResources { apply_strategy: ClusterResourceApplyStrategy, /// Arbitrary Kubernetes object overrides specified by the user via the CRD. - object_overrides: ObjectOverrides, + object_overrides: &'a ObjectOverrides, } -impl ClusterResources { +impl<'a> ClusterResources<'a> { /// Constructs new `ClusterResources`. /// /// # Arguments @@ -487,7 +487,7 @@ impl ClusterResources { controller_name: &str, cluster: &ObjectReference, apply_strategy: ClusterResourceApplyStrategy, - object_overrides: ObjectOverrides, + object_overrides: &'a ObjectOverrides, ) -> Result { let namespace = cluster .namespace