From 1d0e6ced655ba358b3fe07a4f770ed426624ff03 Mon Sep 17 00:00:00 2001 From: changzhen Date: Tue, 4 Apr 2023 10:31:18 +0800 Subject: [PATCH] fix an issue where DeepEqual becomes invalid in aggregate binding status Signed-off-by: changzhen --- pkg/util/helper/workstatus.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/util/helper/workstatus.go b/pkg/util/helper/workstatus.go index 9be147af0..c87842a38 100644 --- a/pkg/util/helper/workstatus.go +++ b/pkg/util/helper/workstatus.go @@ -65,7 +65,7 @@ func AggregateResourceBindingWorkStatus( // set binding status with the newest condition currentBindingStatus.Conditions = binding.Status.Conditions meta.SetStatusCondition(¤tBindingStatus.Conditions, fullyAppliedCondition) - if reflect.DeepEqual(binding.Status, currentBindingStatus) { + if reflect.DeepEqual(binding.Status, *currentBindingStatus) { klog.V(4).Infof("New aggregatedStatuses are equal with old resourceBinding(%s/%s) AggregatedStatus, no update required.", binding.Namespace, binding.Name) return nil @@ -125,7 +125,7 @@ func AggregateClusterResourceBindingWorkStatus( // set binding status with the newest condition currentBindingStatus.Conditions = binding.Status.Conditions meta.SetStatusCondition(¤tBindingStatus.Conditions, fullyAppliedCondition) - if reflect.DeepEqual(binding.Status, currentBindingStatus) { + if reflect.DeepEqual(binding.Status, *currentBindingStatus) { klog.Infof("New aggregatedStatuses are equal with old clusterResourceBinding(%s) AggregatedStatus, no update required.", binding.Name) return nil }