fix cluster controller bug (#2049)

This commit is contained in:
zryfish
2020-05-06 16:23:38 +08:00
committed by GitHub
parent dc6c9cc58e
commit 87e567eaf5

View File

@@ -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)