skip reconcile cluster if not join federation (#3021)

Signed-off-by: Jeff <jeffzhang@yunify.com>
This commit is contained in:
zryfish
2020-10-15 17:11:05 +08:00
committed by GitHub
parent ffa995f2a4
commit 44799ae68a

View File

@@ -440,6 +440,12 @@ func (c *clusterController) syncCluster(key string) error {
return nil
}
// currently we didn't set cluster.Spec.Enable when creating cluster at client side, so only check
// if we enable cluster.Spec.JoinFederation now
if cluster.Spec.JoinFederation == false {
return nil
}
// save a old copy of cluster
oldCluster := cluster.DeepCopy()