Skip to content

Commit 97d3981

Browse files
typeidmjlshen
andcommitted
šŸ› MachineHealthCheck properly remediates unreachable nodes with volumes attached
Co-authored-by: Michael Shen <[email protected]>
1 parent eaf97bc commit 97d3981

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ā€Žinternal/controllers/machine/machine_controller.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -670,8 +670,10 @@ func (r *Reconciler) drainNode(ctx context.Context, cluster *clusterv1.Cluster,
670670
}
671671

672672
if noderefutil.IsNodeUnreachable(node) {
673-
// When the node is unreachable and some pods are not evicted for as long as this timeout, we ignore them.
673+
// When the node is unreachable and some pods are not evicted for as long as this timeout,
674+
// we force remove them
674675
drainer.SkipWaitForDeleteTimeoutSeconds = 60 * 5 // 5 minutes
676+
drainer.GracePeriodSeconds = 1
675677
}
676678

677679
if err := kubedrain.RunCordonOrUncordon(drainer, node, true); err != nil {

0 commit comments

Comments
Ā (0)