Skip to content

Commit 5bde84a

Browse files
committed
fix: always update modelset condition
1 parent 4233288 commit 5bde84a

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

xset/synccontrols/x_utils.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,15 @@ func AddOrUpdateCondition(status *api.XSetStatus, conditionType api.XSetConditio
100100

101101
cond := condition.NewCondition(string(conditionType), condStatus, reason, message)
102102
status.Conditions = condition.SetCondition(status.Conditions, *cond)
103+
104+
// update condition last transition time
105+
for i := range status.Conditions {
106+
c := status.Conditions[i]
107+
if c.Type == string(conditionType) {
108+
status.Conditions[i].LastTransitionTime = metav1.Now()
109+
return
110+
}
111+
}
103112
}
104113

105114
func GetTargetsPrefix(controllerName string) string {

0 commit comments

Comments
 (0)