From 5ed10c55bebcc5eb251d71dad2b3500481f1996f Mon Sep 17 00:00:00 2001 From: Saswata Mukherjee Date: Tue, 10 Dec 2024 12:08:59 +0000 Subject: [PATCH] [ACM-16286]: Ensure hub and spoke obsaddon are synced based on spec Signed-off-by: Saswata Mukherjee --- .../controllers/placementrule/placementrule_controller.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/operators/multiclusterobservability/controllers/placementrule/placementrule_controller.go b/operators/multiclusterobservability/controllers/placementrule/placementrule_controller.go index ce031fb5b..8c614a6f1 100644 --- a/operators/multiclusterobservability/controllers/placementrule/placementrule_controller.go +++ b/operators/multiclusterobservability/controllers/placementrule/placementrule_controller.go @@ -653,7 +653,9 @@ func (r *PlacementRuleReconciler) SetupWithManager(mgr ctrl.Manager) error { e.ObjectNew.GetLabels()[ownerLabelKey] == ownerLabelValue && e.ObjectNew.GetNamespace() != localClusterName && !reflect.DeepEqual(e.ObjectNew.(*mcov1beta1.ObservabilityAddon).Status.Conditions, - e.ObjectOld.(*mcov1beta1.ObservabilityAddon).Status.Conditions) { + e.ObjectOld.(*mcov1beta1.ObservabilityAddon).Status.Conditions) && + !reflect.DeepEqual(e.ObjectNew.(*mcov1beta1.ObservabilityAddon).Spec, + e.ObjectOld.(*mcov1beta1.ObservabilityAddon).Spec) { return true } return false