1
0
mirror of https://github.com/kubernetes-sigs/descheduler.git synced 2026-01-26 05:14:13 +01:00

descheduler: handle single-node clusters gracefully

This commit is contained in:
S J Tharun
2025-10-11 07:53:41 +05:30
parent 925b388702
commit 3033aec6a0

View File

@@ -356,8 +356,8 @@ func (d *descheduler) runDeschedulerLoop(ctx context.Context, nodes []*v1.Node)
// if len is still <= 1 error out
if len(nodes) <= 1 {
klog.V(1).InfoS("The cluster size is 0 or 1 meaning eviction causes service disruption or degradation. So aborting..")
return fmt.Errorf("the cluster size is 0 or 1")
klog.InfoS("Skipping descheduling cycle: requires >=2 nodes", "found", len(nodes))
return nil // gracefully skip this cycle instead of aborting
}
var client clientset.Interface