Skip to content

Commit

Permalink
remove unreachable code
Browse files Browse the repository at this point in the history
  • Loading branch information
carlory committed Jan 2, 2022
1 parent b3f3286 commit d128f6f
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions pkg/controllers/cluster/cluster_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit d128f6f

Please sign in to comment.