Skip to content

Commit

Permalink
Merge pull request #1206 from carlory/fix-cluster-controller
Browse files Browse the repository at this point in the history
remove unreachable code
  • Loading branch information
karmada-bot authored Jan 4, 2022
2 parents 5548f87 + da91752 commit 8b3aefd
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 8b3aefd

Please sign in to comment.