未验证 提交 41fc9636 编写于 作者: K KubeSphere CI Bot 提交者: GitHub

Merge pull request #3199 from fafucoder/master

fixed: check the cluster has initialized
...@@ -538,7 +538,10 @@ func (c *clusterController) syncCluster(key string) error { ...@@ -538,7 +538,10 @@ func (c *clusterController) syncCluster(key string) error {
LastUpdateTime: metav1.Now(), LastUpdateTime: metav1.Now(),
LastTransitionTime: metav1.Now(), LastTransitionTime: metav1.Now(),
} }
c.updateClusterCondition(cluster, initializedCondition)
if !isConditionTrue(cluster, clusterv1alpha1.ClusterInitialized) {
c.updateClusterCondition(cluster, initializedCondition)
}
if !reflect.DeepEqual(oldCluster, cluster) { if !reflect.DeepEqual(oldCluster, cluster) {
cluster, err = c.clusterClient.Update(cluster) cluster, err = c.clusterClient.Update(cluster)
...@@ -546,7 +549,6 @@ func (c *clusterController) syncCluster(key string) error { ...@@ -546,7 +549,6 @@ func (c *clusterController) syncCluster(key string) error {
klog.Errorf("Error updating cluster %s, error %s", cluster.Name, err) klog.Errorf("Error updating cluster %s, error %s", cluster.Name, err)
return err return err
} }
return nil
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册