Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion crates/stackable-operator/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ All notable changes to this project will be documented in this file.

- Update `kube` to `1.1.0` ([#1049]).

### Removed

- Removed `last_update_time` from CRD ClusterCondition status ([#1054]).

[#1049]: https://github.com/stackabletech/operator-rs/pull/1049
[#1054]: https://github.com/stackabletech/operator-rs/pull/1054

## [0.93.2] - 2025-05-26

### Added
Expand All @@ -20,7 +27,6 @@ All notable changes to this project will be documented in this file.

[#986]: https://github.com/stackabletech/operator-rs/pull/986
[#1023]: https://github.com/stackabletech/operator-rs/pull/1023
[#1049]: https://github.com/stackabletech/operator-rs/pull/1049

## [0.93.1] - 2025-05-20

Expand Down
5 changes: 0 additions & 5 deletions crates/stackable-operator/crds/DummyCluster.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ impl DaemonSetConditionBuilder {
status: available,
type_: ClusterConditionType::Available,
last_transition_time: None,
last_update_time: None,
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ impl DeploymentConditionBuilder {
status: available,
type_: ClusterConditionType::Available,
last_transition_time: None,
last_update_time: None,
}
}

Expand Down
14 changes: 6 additions & 8 deletions crates/stackable-operator/src/status/condition/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,17 +93,18 @@ pub struct ClusterCondition {
#[serde(skip_serializing_if = "Option::is_none")]
/// Last time the condition transitioned from one status to another.
pub last_transition_time: Option<Time>,
#[serde(skip_serializing_if = "Option::is_none")]
/// The last time this condition was updated.
pub last_update_time: Option<Time>,

#[serde(skip_serializing_if = "Option::is_none")]
/// A human readable message indicating details about the transition.
pub message: Option<String>,

#[serde(skip_serializing_if = "Option::is_none")]
/// The reason for the condition's last transition.
pub reason: Option<String>,

/// Status of the condition, one of True, False, Unknown.
pub status: ClusterConditionStatus,

/// Type of deployment condition.
#[serde(rename = "type")]
pub type_: ClusterConditionType,
Expand Down Expand Up @@ -346,17 +347,15 @@ fn update_timestamps(
assert_eq!(old_condition.type_, new_condition.type_);

let now = Time(Utc::now());
// No change in status -> update "last_update_time" and keep "last_transition_time"
// No change in status -> keep "last_transition_time"
if old_condition.status == new_condition.status {
ClusterCondition {
last_update_time: Some(now),
last_transition_time: old_condition.last_transition_time,
..new_condition
}
// Change in status -> set new "last_update_time" and "last_transition_time"
// Change in status -> set new "last_transition_time"
} else {
ClusterCondition {
last_update_time: Some(now.clone()),
last_transition_time: Some(now),
..new_condition
}
Expand Down Expand Up @@ -511,7 +510,6 @@ mod tests {
assert_eq!(got.type_, expected.type_);
assert_eq!(got.status, expected.status);
assert_eq!(got.message, expected.message);
assert_eq!(got.last_transition_time, got.last_update_time);
assert!(got.last_transition_time.is_some());
}

Expand Down
2 changes: 0 additions & 2 deletions crates/stackable-operator/src/status/condition/operations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ impl<'a> ClusterOperationsConditionBuilder<'a> {
status,
type_: ClusterConditionType::ReconciliationPaused,
last_transition_time: None,
last_update_time: None,
}
}

Expand Down Expand Up @@ -82,7 +81,6 @@ impl<'a> ClusterOperationsConditionBuilder<'a> {
status,
type_: ClusterConditionType::Stopped,
last_transition_time: None,
last_update_time: None,
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ impl StatefulSetConditionBuilder {
status: available,
type_: ClusterConditionType::Available,
last_transition_time: None,
last_update_time: None,
}
}

Expand Down