feat(pkg/descheduler): do not cancel the context when runDeschedulerLoop fails

When the descheduler is running in the dry mode the the kube client sandbox restoring may fail.
Which can be caused by timeouts when waiting for internal caches to sync.
The internal timeouts depend on the cluster size which changes in time.
No reason to cancel the context because of that.
This commit is contained in:
Jan Chaloupka
2026-02-03 23:28:16 +01:00
parent 0d05e5dd1f
commit f26ab740fe

View File

@@ -699,7 +699,6 @@ func RunDeschedulerStrategies(ctx context.Context, rs *options.DeschedulerServer
if err != nil {
sSpan.AddEvent("Failed to run descheduler loop", trace.WithAttributes(attribute.String("err", err.Error())))
klog.Error(err)
cancel()
return
}
// If there was no interval specified, send a signal to the stopChannel to end the wait.Until loop after 1 iteration