Skip to content

Commit

Permalink
use existing equal condition check
Browse files Browse the repository at this point in the history
  • Loading branch information
Arvindthiru committed Jul 15, 2024
1 parent 0d2313a commit 695935a
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions pkg/controllers/workgenerator/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -922,17 +922,9 @@ func isFailedResourcePlacementsEqual(oldFailedResourcePlacements, newFailedResou
if !apiequality.Semantic.DeepEqual(oldFailedResourcePlacement.ResourceIdentifier, newFailedResourcePlacement.ResourceIdentifier) {
return false
}
if !isConditionsEqual(oldFailedResourcePlacement.Condition, newFailedResourcePlacement.Condition) {
if !condition.EqualCondition(&oldFailedResourcePlacement.Condition, &newFailedResourcePlacement.Condition) {
return false
}
}
return true
}

func isConditionsEqual(oldCondition, newCondition metav1.Condition) bool {
oldCondition.LastTransitionTime = metav1.Time{}
newCondition.LastTransitionTime = metav1.Time{}
oldCondition.Message = ""
newCondition.Message = ""
return apiequality.Semantic.DeepEqual(oldCondition, newCondition)
}

0 comments on commit 695935a

Please sign in to comment.