[release-3.3] controller/cluster: retry when updating the KubeFedCluster conflicted (#5655)
controller/cluster: retry when updating the KubeFedCluster conflicted
This commit is contained in:
@@ -407,6 +407,11 @@ func (c *clusterController) syncCluster(key string) error {
|
||||
} else { // join federation
|
||||
_, err = c.joinFederation(clusterConfig, cluster.Name, cluster.Labels)
|
||||
if err != nil {
|
||||
if errors.IsConflict(err) {
|
||||
klog.Warningf("update KubeFedCluster %s conflicted, retrying", cluster.Name)
|
||||
return err
|
||||
}
|
||||
|
||||
klog.Errorf("Failed to join federation for cluster %s, error %v", cluster.Name, err)
|
||||
|
||||
federationNotReadyCondition := clusterv1alpha1.ClusterCondition{
|
||||
|
||||
Reference in New Issue
Block a user