Skip to content

Commit

Permalink
Merge pull request #106686 from ahg-g/automated-cherry-pick-of-#10641…
Browse files Browse the repository at this point in the history
…2-upstream-release-1.20

Automated cherry pick of #106412: kube-scheduler: Increase the duration to expire an assumed
  • Loading branch information
k8s-ci-robot committed Nov 25, 2021
2 parents 2f71576 + 317f072 commit 5d90a1c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/scheduler/scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ const (
SchedulerError = "SchedulerError"
// Percentage of plugin metrics to be sampled.
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 = 2 * time.Minute
)

// Scheduler watches for new unscheduled pods. It attempts to find
Expand Down Expand Up @@ -202,8 +205,7 @@ func New(client clientset.Interface,
opt(&options)
}

schedulerCache := internalcache.New(30*time.Second, stopEverything)

schedulerCache := internalcache.New(durationToExpireAssumedPod, stopEverything)
registry := frameworkplugins.NewInTreeRegistry()
if err := registry.Merge(options.frameworkOutOfTreeRegistry); err != nil {
return nil, err
Expand Down

0 comments on commit 5d90a1c

Please sign in to comment.