Skip to content

Commit

Permalink
Remove duplicate checks for deletionTimestamp (#987)
Browse files Browse the repository at this point in the history
Signed-off-by: Vince Prignano <[email protected]>
  • Loading branch information
vincepri authored and k8s-ci-robot committed Jun 7, 2019
1 parent 5fd25dc commit aacb0c6
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -210,10 +210,6 @@ func (r *ReconcileMachineDeployment) reconcile(ctx context.Context, d *v1alpha1.
return reconcile.Result{}, err
}

if d.DeletionTimestamp != nil {
return reconcile.Result{}, r.sync(d, msList, machineMap)
}

if d.Spec.Paused {
return reconcile.Result{}, r.sync(d, msList, machineMap)
}
Expand Down
5 changes: 0 additions & 5 deletions pkg/controller/machineset/machineset_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,6 @@ func (r *ReconcileMachineSet) reconcile(ctx context.Context, machineSet *cluster
return reconcile.Result{Requeue: true}, nil
}

// Return early if the MachineSet is deleted.
if !machineSet.ObjectMeta.DeletionTimestamp.IsZero() {
return reconcile.Result{}, nil
}

// Filter out irrelevant machines (deleting/mismatch labels) and claim orphaned machines.
filteredMachines := make([]*clusterv1alpha1.Machine, 0, len(allMachines.Items))
for idx := range allMachines.Items {
Expand Down

0 comments on commit aacb0c6

Please sign in to comment.