remove unreachable code

Signed-off-by: carlory <baofa.fan@daocloud.io>
This commit is contained in:
carlory 2022-01-02 22:12:24 +08:00
parent b3f3286d18
commit da91752a29
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())