Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: yaroslavborbat <[email protected]>
  • Loading branch information
yaroslavborbat committed Oct 1, 2024
1 parent 782e1bb commit bdea18e
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"fmt"
"time"

metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
virtv1 "kubevirt.io/api/core/v1"
"sigs.k8s.io/controller-runtime/pkg/client"
Expand Down Expand Up @@ -234,7 +235,7 @@ func (s VMOperationService) isAfterSignalSentOrCreation(timestamp time.Time, vmo
// Use vmop creation time or time from SignalSent condition.
signalSentTime := vmop.GetCreationTimestamp().Time
signalSendCond, found := GetCondition(vmopcondition.SignalSentType.String(), vmop.Status.Conditions)
if found && signalSendCond.LastTransitionTime.After(signalSentTime) {
if found && signalSendCond.Status == metav1.ConditionTrue && signalSendCond.LastTransitionTime.After(signalSentTime) {
signalSentTime = signalSendCond.LastTransitionTime.Time
}
return timestamp.After(signalSentTime)
Expand Down

0 comments on commit bdea18e

Please sign in to comment.