Merge pull request #1206 from carlory/fix-cluster-controller

remove unreachable code
This commit is contained in:
karmada-bot 2022-01-04 14:15:45 +08:00 committed by GitHub
commit 8b3aefdb6f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 3 deletions

View File

@ -123,9 +123,6 @@ func (c *Controller) syncCluster(cluster *clusterv1alpha1.Cluster) (controllerru
func (c *Controller) removeCluster(cluster *clusterv1alpha1.Cluster) (controllerruntime.Result, error) {
err := c.removeExecutionSpace(cluster)
if apierrors.IsNotFound(err) {
return c.removeFinalizer(cluster)
}
if err != nil {
klog.Errorf("Failed to remove execution space %v, err is %v", cluster.Name, err)
c.EventRecorder.Event(cluster, corev1.EventTypeWarning, fmt.Sprintf("Failed %s", clusterv1alpha1.EventReasonCreateExecutionSpaceFailed), err.Error())