diff --git a/pkg/controller/cluster/cluster_controller.go b/pkg/controller/cluster/cluster_controller.go index eb5b31aa34303a5da74514dfc7e266466d5a1ddf..c3c179196ccd8fc6676dcd9b766984f190c0712a 100644 --- a/pkg/controller/cluster/cluster_controller.go +++ b/pkg/controller/cluster/cluster_controller.go @@ -538,7 +538,10 @@ func (c *clusterController) syncCluster(key string) error { LastUpdateTime: metav1.Now(), LastTransitionTime: metav1.Now(), } - c.updateClusterCondition(cluster, initializedCondition) + + if !isConditionTrue(cluster, clusterv1alpha1.ClusterInitialized) { + c.updateClusterCondition(cluster, initializedCondition) + } if !reflect.DeepEqual(oldCluster, cluster) { cluster, err = c.clusterClient.Update(cluster) @@ -546,7 +549,6 @@ func (c *clusterController) syncCluster(key string) error { klog.Errorf("Error updating cluster %s, error %s", cluster.Name, err) return err } - return nil } }