Remove BindTimeoutSeconds from KubeSchedulerConfiguration

This commit is contained in:
Yecheng Fu
2020-05-29 21:45:24 +08:00
parent 367f75e203
commit 1ff09c0934
15 changed files with 26 additions and 233 deletions

View File

@@ -41,7 +41,6 @@ import (
"k8s.io/kubernetes/pkg/scheduler/apis/config/scheme"
"k8s.io/kubernetes/pkg/scheduler/core"
frameworkplugins "k8s.io/kubernetes/pkg/scheduler/framework/plugins"
"k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumebinding"
framework "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1"
internalcache "k8s.io/kubernetes/pkg/scheduler/internal/cache"
internalqueue "k8s.io/kubernetes/pkg/scheduler/internal/queue"
@@ -113,7 +112,6 @@ type schedulerOptions struct {
schedulerAlgorithmSource schedulerapi.SchedulerAlgorithmSource
disablePreemption bool
percentageOfNodesToScore int32
bindTimeoutSeconds int64
podInitialBackoffSeconds int64
podMaxBackoffSeconds int64
// Contains out-of-tree plugins to be merged with the in-tree registry.
@@ -155,13 +153,6 @@ func WithPercentageOfNodesToScore(percentageOfNodesToScore int32) Option {
}
}
// WithBindTimeoutSeconds sets bindTimeoutSeconds for Scheduler, the default value is 100
func WithBindTimeoutSeconds(bindTimeoutSeconds int64) Option {
return func(o *schedulerOptions) {
o.bindTimeoutSeconds = bindTimeoutSeconds
}
}
// WithFrameworkOutOfTreeRegistry sets the registry for out-of-tree plugins. Those plugins
// will be appended to the default registry.
func WithFrameworkOutOfTreeRegistry(registry framework.Registry) Option {
@@ -211,7 +202,6 @@ var defaultSchedulerOptions = schedulerOptions{
},
disablePreemption: false,
percentageOfNodesToScore: schedulerapi.DefaultPercentageOfNodesToScore,
bindTimeoutSeconds: volumebinding.DefaultBindTimeoutSeconds,
podInitialBackoffSeconds: int64(internalqueue.DefaultPodInitialBackoffDuration.Seconds()),
podMaxBackoffSeconds: int64(internalqueue.DefaultPodMaxBackoffDuration.Seconds()),
}
@@ -252,7 +242,6 @@ func New(client clientset.Interface,
StopEverything: stopEverything,
disablePreemption: options.disablePreemption,
percentageOfNodesToScore: options.percentageOfNodesToScore,
bindTimeoutSeconds: options.bindTimeoutSeconds,
podInitialBackoffSeconds: options.podInitialBackoffSeconds,
podMaxBackoffSeconds: options.podMaxBackoffSeconds,
profiles: append([]schedulerapi.KubeSchedulerProfile(nil), options.profiles...),