Skip to content

Commit 5d92476

Browse files
committed
[FIX] - Last Transition Time (Status) (#1656)
Adding a fix to resolve the last transitiion time
1 parent 4e6aec7 commit 5d92476

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/controller/conditions.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ func EnsureConditionsRegistered(conditions []corev1alpha1.ConditionSpec, resourc
4848
if condition.Status == "" {
4949
condition.Status = metav1.ConditionFalse
5050
}
51+
if condition.LastTransitionTime.IsZero() {
52+
condition.LastTransitionTime = metav1.Now()
53+
}
5154

5255
status.Conditions = append(status.Conditions, condition)
5356
}

0 commit comments

Comments
 (0)