kube-scheduler: Increase the duration to expire an assumed pod

This commit is contained in:
Abdullah Gharaibeh 2021-11-14 17:21:35 -05:00
parent e4c795168b
commit d20446377e

View File

@ -57,6 +57,9 @@ const (
SchedulerError = "SchedulerError" SchedulerError = "SchedulerError"
// Percentage of plugin metrics to be sampled. // Percentage of plugin metrics to be sampled.
pluginMetricsSamplePercent = 10 pluginMetricsSamplePercent = 10
// Duration the scheduler will wait before expiring an assumed pod.
// See issue #106361 for more details about this parameter and its value.
durationToExpireAssumedPod = 15 * time.Minute
) )
// Scheduler watches for new unscheduled pods. It attempts to find // Scheduler watches for new unscheduled pods. It attempts to find
@ -228,7 +231,7 @@ func New(client clientset.Interface,
} }
options.profiles = cfg.Profiles options.profiles = cfg.Profiles
} }
schedulerCache := internalcache.New(30*time.Second, stopEverything) schedulerCache := internalcache.New(durationToExpireAssumedPod, stopEverything)
registry := frameworkplugins.NewInTreeRegistry() registry := frameworkplugins.NewInTreeRegistry()
if err := registry.Merge(options.frameworkOutOfTreeRegistry); err != nil { if err := registry.Merge(options.frameworkOutOfTreeRegistry); err != nil {