Skip to content

Commit 2384a57

Browse files
committed
remove last update time from ClusterCondition
1 parent 1b610a8 commit 2384a57

File tree

5 files changed

+4
-10
lines changed

5 files changed

+4
-10
lines changed

crates/stackable-operator/src/status/condition/daemonset.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ impl DaemonSetConditionBuilder {
6363
status: available,
6464
type_: ClusterConditionType::Available,
6565
last_transition_time: None,
66-
last_update_time: None,
6766
}
6867
}
6968

crates/stackable-operator/src/status/condition/deployment.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ impl DeploymentConditionBuilder {
6464
status: available,
6565
type_: ClusterConditionType::Available,
6666
last_transition_time: None,
67-
last_update_time: None,
6867
}
6968
}
7069

crates/stackable-operator/src/status/condition/mod.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,17 +93,18 @@ pub struct ClusterCondition {
9393
#[serde(skip_serializing_if = "Option::is_none")]
9494
/// Last time the condition transitioned from one status to another.
9595
pub last_transition_time: Option<Time>,
96-
#[serde(skip_serializing_if = "Option::is_none")]
97-
/// The last time this condition was updated.
98-
pub last_update_time: Option<Time>,
96+
9997
#[serde(skip_serializing_if = "Option::is_none")]
10098
/// A human readable message indicating details about the transition.
10199
pub message: Option<String>,
100+
102101
#[serde(skip_serializing_if = "Option::is_none")]
103102
/// The reason for the condition's last transition.
104103
pub reason: Option<String>,
104+
105105
/// Status of the condition, one of True, False, Unknown.
106106
pub status: ClusterConditionStatus,
107+
107108
/// Type of deployment condition.
108109
#[serde(rename = "type")]
109110
pub type_: ClusterConditionType,
@@ -349,14 +350,12 @@ fn update_timestamps(
349350
// No change in status -> update "last_update_time" and keep "last_transition_time"
350351
if old_condition.status == new_condition.status {
351352
ClusterCondition {
352-
last_update_time: Some(now),
353353
last_transition_time: old_condition.last_transition_time,
354354
..new_condition
355355
}
356356
// Change in status -> set new "last_update_time" and "last_transition_time"
357357
} else {
358358
ClusterCondition {
359-
last_update_time: Some(now.clone()),
360359
last_transition_time: Some(now),
361360
..new_condition
362361
}

crates/stackable-operator/src/status/condition/operations.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ impl<'a> ClusterOperationsConditionBuilder<'a> {
4949
status,
5050
type_: ClusterConditionType::ReconciliationPaused,
5151
last_transition_time: None,
52-
last_update_time: None,
5352
}
5453
}
5554

@@ -82,7 +81,6 @@ impl<'a> ClusterOperationsConditionBuilder<'a> {
8281
status,
8382
type_: ClusterConditionType::Stopped,
8483
last_transition_time: None,
85-
last_update_time: None,
8684
}
8785
}
8886
}

crates/stackable-operator/src/status/condition/statefulset.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ impl StatefulSetConditionBuilder {
6464
status: available,
6565
type_: ClusterConditionType::Available,
6666
last_transition_time: None,
67-
last_update_time: None,
6867
}
6968
}
7069

0 commit comments

Comments
 (0)