From 87e567eaf5bfeec44ed415410a1082e178b616d9 Mon Sep 17 00:00:00 2001 From: zryfish Date: Wed, 6 May 2020 16:23:38 +0800 Subject: [PATCH] fix cluster controller bug (#2049) --- pkg/controller/cluster/cluster_controller.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/controller/cluster/cluster_controller.go b/pkg/controller/cluster/cluster_controller.go index fe0200da8..7a7623709 100644 --- a/pkg/controller/cluster/cluster_controller.go +++ b/pkg/controller/cluster/cluster_controller.go @@ -319,7 +319,7 @@ func (c *ClusterController) syncCluster(key string) error { } c.updateClusterCondition(cluster, initializedCondition) - if !reflect.DeepEqual(oldCluster.Spec, cluster.Spec) { + if !reflect.DeepEqual(oldCluster, cluster) { cluster, err = c.clusterClient.Update(cluster) if err != nil { klog.Errorf("Error updating cluster %s, error %s", cluster.Name, err)