Skip to content

Commit

Permalink
Set up LastTransition in case it is null
Browse files Browse the repository at this point in the history
  • Loading branch information
alvneiayu committed Nov 13, 2023
1 parent 05ad86e commit b719026
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,8 @@ func updateSealedSecretsStatusConditions(st *ssv1alpha1.SealedSecretStatus, unse
if cond.Status != status {
if !cond.LastUpdateTime.IsZero() {
cond.LastTransitionTime = cond.LastUpdateTime
} else {
cond.LastTransitionTime = metav1.Now()
}
cond.Status = status
cond.LastUpdateTime = metav1.Now()
Expand Down

0 comments on commit b719026

Please sign in to comment.