Skip to content

Commit

Permalink
use TerminalError
Browse files Browse the repository at this point in the history
  • Loading branch information
jmdeal committed Jan 15, 2025
1 parent 044cf4d commit d536a96
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/controllers/node/termination/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,7 @@ func (c *Controller) finalize(ctx context.Context, node *corev1.Node) (reconcile
nodeClaim, err := nodeutils.NodeClaimForNode(ctx, c.kubeClient, node)
if err != nil {
if nodeutils.IsDuplicateNodeClaimError(err) || nodeutils.IsNodeClaimNotFoundError(err) {
log.FromContext(ctx).Error(err, "failed to terminate node")
return reconcile.Result{}, nil
return reconcile.Result{}, reconcile.TerminalError(fmt.Errorf("failed to terminate node, %w", err))
}
return reconcile.Result{}, err
}
Expand Down

0 comments on commit d536a96

Please sign in to comment.