Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
4f0bd412
Commit
4f0bd412
authored
Apr 11, 2018
by
Harry Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable pod preemption by config
parent
dfd6f581
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
90 additions
and
8 deletions
+90
-8
server.go
cmd/kube-scheduler/app/server.go
+6
-0
types.go
pkg/apis/componentconfig/types.go
+3
-0
types.go
pkg/apis/componentconfig/v1alpha1/types.go
+3
-0
zz_generated.conversion.go
pkg/apis/componentconfig/v1alpha1/zz_generated.conversion.go
+2
-0
compatibility_test.go
...cheduler/algorithmprovider/defaults/compatibility_test.go
+1
-0
extender_test.go
pkg/scheduler/core/extender_test.go
+12
-1
generic_scheduler.go
pkg/scheduler/core/generic_scheduler.go
+5
-1
generic_scheduler_test.go
pkg/scheduler/core/generic_scheduler_test.go
+24
-2
factory.go
pkg/scheduler/factory/factory.go
+19
-1
factory_test.go
pkg/scheduler/factory/factory_test.go
+5
-1
scheduler.go
pkg/scheduler/scheduler.go
+6
-2
scheduler_test.go
pkg/scheduler/scheduler_test.go
+2
-0
util.go
test/integration/scheduler/util.go
+1
-0
util.go
test/integration/util/util.go
+1
-0
No files found.
cmd/kube-scheduler/app/server.go
View file @
4f0bd412
...
@@ -381,6 +381,8 @@ type SchedulerServer struct {
...
@@ -381,6 +381,8 @@ type SchedulerServer struct {
HealthzServer
*
http
.
Server
HealthzServer
*
http
.
Server
// MetricsServer is optional.
// MetricsServer is optional.
MetricsServer
*
http
.
Server
MetricsServer
*
http
.
Server
// Disable pod preemption or not.
DisablePreemption
bool
}
}
// NewSchedulerServer creates a runnable SchedulerServer from configuration.
// NewSchedulerServer creates a runnable SchedulerServer from configuration.
...
@@ -445,6 +447,7 @@ func NewSchedulerServer(config *componentconfig.KubeSchedulerConfiguration, mast
...
@@ -445,6 +447,7 @@ func NewSchedulerServer(config *componentconfig.KubeSchedulerConfiguration, mast
LeaderElection
:
leaderElectionConfig
,
LeaderElection
:
leaderElectionConfig
,
HealthzServer
:
healthzServer
,
HealthzServer
:
healthzServer
,
MetricsServer
:
metricsServer
,
MetricsServer
:
metricsServer
,
DisablePreemption
:
config
.
DisablePreemption
,
},
nil
},
nil
}
}
...
@@ -659,6 +662,7 @@ func (s *SchedulerServer) SchedulerConfig() (*scheduler.Config, error) {
...
@@ -659,6 +662,7 @@ func (s *SchedulerServer) SchedulerConfig() (*scheduler.Config, error) {
storageClassInformer
,
storageClassInformer
,
s
.
HardPodAffinitySymmetricWeight
,
s
.
HardPodAffinitySymmetricWeight
,
utilfeature
.
DefaultFeatureGate
.
Enabled
(
features
.
EnableEquivalenceClassCache
),
utilfeature
.
DefaultFeatureGate
.
Enabled
(
features
.
EnableEquivalenceClassCache
),
s
.
DisablePreemption
,
)
)
source
:=
s
.
AlgorithmSource
source
:=
s
.
AlgorithmSource
...
@@ -716,5 +720,7 @@ func (s *SchedulerServer) SchedulerConfig() (*scheduler.Config, error) {
...
@@ -716,5 +720,7 @@ func (s *SchedulerServer) SchedulerConfig() (*scheduler.Config, error) {
}
}
// Additional tweaks to the config produced by the configurator.
// Additional tweaks to the config produced by the configurator.
config
.
Recorder
=
s
.
Recorder
config
.
Recorder
=
s
.
Recorder
config
.
DisablePreemption
=
s
.
DisablePreemption
return
config
,
nil
return
config
,
nil
}
}
pkg/apis/componentconfig/types.go
View file @
4f0bd412
...
@@ -111,6 +111,9 @@ type KubeSchedulerConfiguration struct {
...
@@ -111,6 +111,9 @@ type KubeSchedulerConfiguration struct {
// Indicate the "all topologies" set for empty topologyKey when it's used for PreferredDuringScheduling pod anti-affinity.
// Indicate the "all topologies" set for empty topologyKey when it's used for PreferredDuringScheduling pod anti-affinity.
// DEPRECATED: This is no longer used.
// DEPRECATED: This is no longer used.
FailureDomains
string
FailureDomains
string
// DisablePreemption disables the pod preemption feature.
DisablePreemption
bool
}
}
// KubeSchedulerLeaderElectionConfiguration expands LeaderElectionConfiguration
// KubeSchedulerLeaderElectionConfiguration expands LeaderElectionConfiguration
...
...
pkg/apis/componentconfig/v1alpha1/types.go
View file @
4f0bd412
...
@@ -106,6 +106,9 @@ type KubeSchedulerConfiguration struct {
...
@@ -106,6 +106,9 @@ type KubeSchedulerConfiguration struct {
// Indicate the "all topologies" set for empty topologyKey when it's used for PreferredDuringScheduling pod anti-affinity.
// Indicate the "all topologies" set for empty topologyKey when it's used for PreferredDuringScheduling pod anti-affinity.
FailureDomains
string
`json:"failureDomains"`
FailureDomains
string
`json:"failureDomains"`
// DisablePreemption disables the pod preemption feature.
DisablePreemption
bool
`json:"disablePreemption"`
}
}
// LeaderElectionConfiguration defines the configuration of leader election
// LeaderElectionConfiguration defines the configuration of leader election
...
...
pkg/apis/componentconfig/v1alpha1/zz_generated.conversion.go
View file @
4f0bd412
...
@@ -309,6 +309,7 @@ func autoConvert_v1alpha1_KubeSchedulerConfiguration_To_componentconfig_KubeSche
...
@@ -309,6 +309,7 @@ func autoConvert_v1alpha1_KubeSchedulerConfiguration_To_componentconfig_KubeSche
out
.
EnableProfiling
=
in
.
EnableProfiling
out
.
EnableProfiling
=
in
.
EnableProfiling
out
.
EnableContentionProfiling
=
in
.
EnableContentionProfiling
out
.
EnableContentionProfiling
=
in
.
EnableContentionProfiling
out
.
FailureDomains
=
in
.
FailureDomains
out
.
FailureDomains
=
in
.
FailureDomains
out
.
DisablePreemption
=
in
.
DisablePreemption
return
nil
return
nil
}
}
...
@@ -334,6 +335,7 @@ func autoConvert_componentconfig_KubeSchedulerConfiguration_To_v1alpha1_KubeSche
...
@@ -334,6 +335,7 @@ func autoConvert_componentconfig_KubeSchedulerConfiguration_To_v1alpha1_KubeSche
out
.
EnableProfiling
=
in
.
EnableProfiling
out
.
EnableProfiling
=
in
.
EnableProfiling
out
.
EnableContentionProfiling
=
in
.
EnableContentionProfiling
out
.
EnableContentionProfiling
=
in
.
EnableContentionProfiling
out
.
FailureDomains
=
in
.
FailureDomains
out
.
FailureDomains
=
in
.
FailureDomains
out
.
DisablePreemption
=
in
.
DisablePreemption
return
nil
return
nil
}
}
...
...
pkg/scheduler/algorithmprovider/defaults/compatibility_test.go
View file @
4f0bd412
...
@@ -579,6 +579,7 @@ func TestCompatibility_v1_Scheduler(t *testing.T) {
...
@@ -579,6 +579,7 @@ func TestCompatibility_v1_Scheduler(t *testing.T) {
informerFactory
.
Storage
()
.
V1
()
.
StorageClasses
(),
informerFactory
.
Storage
()
.
V1
()
.
StorageClasses
(),
v1
.
DefaultHardPodAffinitySymmetricWeight
,
v1
.
DefaultHardPodAffinitySymmetricWeight
,
enableEquivalenceCache
,
enableEquivalenceCache
,
false
,
)
.
CreateFromConfig
(
policy
);
err
!=
nil
{
)
.
CreateFromConfig
(
policy
);
err
!=
nil
{
t
.
Errorf
(
"%s: Error constructing: %v"
,
v
,
err
)
t
.
Errorf
(
"%s: Error constructing: %v"
,
v
,
err
)
continue
continue
...
...
pkg/scheduler/core/extender_test.go
View file @
4f0bd412
...
@@ -506,7 +506,18 @@ func TestGenericSchedulerWithExtenders(t *testing.T) {
...
@@ -506,7 +506,18 @@ func TestGenericSchedulerWithExtenders(t *testing.T) {
}
}
queue
:=
NewSchedulingQueue
()
queue
:=
NewSchedulingQueue
()
scheduler
:=
NewGenericScheduler
(
scheduler
:=
NewGenericScheduler
(
cache
,
nil
,
queue
,
test
.
predicates
,
algorithm
.
EmptyPredicateMetadataProducer
,
test
.
prioritizers
,
algorithm
.
EmptyPriorityMetadataProducer
,
extenders
,
nil
,
schedulertesting
.
FakePersistentVolumeClaimLister
{},
false
)
cache
,
nil
,
queue
,
test
.
predicates
,
algorithm
.
EmptyPredicateMetadataProducer
,
test
.
prioritizers
,
algorithm
.
EmptyPriorityMetadataProducer
,
extenders
,
nil
,
schedulertesting
.
FakePersistentVolumeClaimLister
{},
false
,
false
)
podIgnored
:=
&
v1
.
Pod
{}
podIgnored
:=
&
v1
.
Pod
{}
machine
,
err
:=
scheduler
.
Schedule
(
podIgnored
,
schedulertesting
.
FakeNodeLister
(
makeNodeList
(
test
.
nodes
)))
machine
,
err
:=
scheduler
.
Schedule
(
podIgnored
,
schedulertesting
.
FakeNodeLister
(
makeNodeList
(
test
.
nodes
)))
if
test
.
expectsErr
{
if
test
.
expectsErr
{
...
...
pkg/scheduler/core/generic_scheduler.go
View file @
4f0bd412
...
@@ -98,6 +98,7 @@ type genericScheduler struct {
...
@@ -98,6 +98,7 @@ type genericScheduler struct {
cachedNodeInfoMap
map
[
string
]
*
schedulercache
.
NodeInfo
cachedNodeInfoMap
map
[
string
]
*
schedulercache
.
NodeInfo
volumeBinder
*
volumebinder
.
VolumeBinder
volumeBinder
*
volumebinder
.
VolumeBinder
pvcLister
corelisters
.
PersistentVolumeClaimLister
pvcLister
corelisters
.
PersistentVolumeClaimLister
disablePreemption
bool
}
}
// Schedule tries to schedule the given pod to one of the nodes in the node list.
// Schedule tries to schedule the given pod to one of the nodes in the node list.
...
@@ -1107,7 +1108,9 @@ func NewGenericScheduler(
...
@@ -1107,7 +1108,9 @@ func NewGenericScheduler(
extenders
[]
algorithm
.
SchedulerExtender
,
extenders
[]
algorithm
.
SchedulerExtender
,
volumeBinder
*
volumebinder
.
VolumeBinder
,
volumeBinder
*
volumebinder
.
VolumeBinder
,
pvcLister
corelisters
.
PersistentVolumeClaimLister
,
pvcLister
corelisters
.
PersistentVolumeClaimLister
,
alwaysCheckAllPredicates
bool
)
algorithm
.
ScheduleAlgorithm
{
alwaysCheckAllPredicates
bool
,
disablePreemption
bool
,
)
algorithm
.
ScheduleAlgorithm
{
return
&
genericScheduler
{
return
&
genericScheduler
{
cache
:
cache
,
cache
:
cache
,
equivalenceCache
:
eCache
,
equivalenceCache
:
eCache
,
...
@@ -1121,5 +1124,6 @@ func NewGenericScheduler(
...
@@ -1121,5 +1124,6 @@ func NewGenericScheduler(
volumeBinder
:
volumeBinder
,
volumeBinder
:
volumeBinder
,
pvcLister
:
pvcLister
,
pvcLister
:
pvcLister
,
alwaysCheckAllPredicates
:
alwaysCheckAllPredicates
,
alwaysCheckAllPredicates
:
alwaysCheckAllPredicates
,
disablePreemption
:
disablePreemption
,
}
}
}
}
pkg/scheduler/core/generic_scheduler_test.go
View file @
4f0bd412
...
@@ -409,7 +409,18 @@ func TestGenericScheduler(t *testing.T) {
...
@@ -409,7 +409,18 @@ func TestGenericScheduler(t *testing.T) {
pvcLister
:=
schedulertesting
.
FakePersistentVolumeClaimLister
(
pvcs
)
pvcLister
:=
schedulertesting
.
FakePersistentVolumeClaimLister
(
pvcs
)
scheduler
:=
NewGenericScheduler
(
scheduler
:=
NewGenericScheduler
(
cache
,
nil
,
NewSchedulingQueue
(),
test
.
predicates
,
algorithm
.
EmptyPredicateMetadataProducer
,
test
.
prioritizers
,
algorithm
.
EmptyPriorityMetadataProducer
,
[]
algorithm
.
SchedulerExtender
{},
nil
,
pvcLister
,
test
.
alwaysCheckAllPredicates
)
cache
,
nil
,
NewSchedulingQueue
(),
test
.
predicates
,
algorithm
.
EmptyPredicateMetadataProducer
,
test
.
prioritizers
,
algorithm
.
EmptyPriorityMetadataProducer
,
[]
algorithm
.
SchedulerExtender
{},
nil
,
pvcLister
,
test
.
alwaysCheckAllPredicates
,
false
)
machine
,
err
:=
scheduler
.
Schedule
(
test
.
pod
,
schedulertesting
.
FakeNodeLister
(
makeNodeList
(
test
.
nodes
)))
machine
,
err
:=
scheduler
.
Schedule
(
test
.
pod
,
schedulertesting
.
FakeNodeLister
(
makeNodeList
(
test
.
nodes
)))
if
!
reflect
.
DeepEqual
(
err
,
test
.
wErr
)
{
if
!
reflect
.
DeepEqual
(
err
,
test
.
wErr
)
{
...
@@ -1323,7 +1334,18 @@ func TestPreempt(t *testing.T) {
...
@@ -1323,7 +1334,18 @@ func TestPreempt(t *testing.T) {
extenders
=
append
(
extenders
,
extender
)
extenders
=
append
(
extenders
,
extender
)
}
}
scheduler
:=
NewGenericScheduler
(
scheduler
:=
NewGenericScheduler
(
cache
,
nil
,
NewSchedulingQueue
(),
map
[
string
]
algorithm
.
FitPredicate
{
"matches"
:
algorithmpredicates
.
PodFitsResources
},
algorithm
.
EmptyPredicateMetadataProducer
,
[]
algorithm
.
PriorityConfig
{{
Function
:
numericPriority
,
Weight
:
1
}},
algorithm
.
EmptyPriorityMetadataProducer
,
extenders
,
nil
,
schedulertesting
.
FakePersistentVolumeClaimLister
{},
false
)
cache
,
nil
,
NewSchedulingQueue
(),
map
[
string
]
algorithm
.
FitPredicate
{
"matches"
:
algorithmpredicates
.
PodFitsResources
},
algorithm
.
EmptyPredicateMetadataProducer
,
[]
algorithm
.
PriorityConfig
{{
Function
:
numericPriority
,
Weight
:
1
}},
algorithm
.
EmptyPriorityMetadataProducer
,
extenders
,
nil
,
schedulertesting
.
FakePersistentVolumeClaimLister
{},
false
,
false
)
// Call Preempt and check the expected results.
// Call Preempt and check the expected results.
node
,
victims
,
_
,
err
:=
scheduler
.
Preempt
(
test
.
pod
,
schedulertesting
.
FakeNodeLister
(
makeNodeList
(
nodeNames
)),
error
(
&
FitError
{
Pod
:
test
.
pod
,
FailedPredicates
:
failedPredMap
}))
node
,
victims
,
_
,
err
:=
scheduler
.
Preempt
(
test
.
pod
,
schedulertesting
.
FakeNodeLister
(
makeNodeList
(
nodeNames
)),
error
(
&
FitError
{
Pod
:
test
.
pod
,
FailedPredicates
:
failedPredMap
}))
if
err
!=
nil
{
if
err
!=
nil
{
...
...
pkg/scheduler/factory/factory.go
View file @
4f0bd412
...
@@ -133,6 +133,9 @@ type configFactory struct {
...
@@ -133,6 +133,9 @@ type configFactory struct {
// always check all predicates even if the middle of one predicate fails.
// always check all predicates even if the middle of one predicate fails.
alwaysCheckAllPredicates
bool
alwaysCheckAllPredicates
bool
// Disable pod preemption or not.
disablePreemption
bool
}
}
// NewConfigFactory initializes the default implementation of a Configurator To encourage eventual privatization of the struct type, we only
// NewConfigFactory initializes the default implementation of a Configurator To encourage eventual privatization of the struct type, we only
...
@@ -152,6 +155,7 @@ func NewConfigFactory(
...
@@ -152,6 +155,7 @@ func NewConfigFactory(
storageClassInformer
storageinformers
.
StorageClassInformer
,
storageClassInformer
storageinformers
.
StorageClassInformer
,
hardPodAffinitySymmetricWeight
int32
,
hardPodAffinitySymmetricWeight
int32
,
enableEquivalenceClassCache
bool
,
enableEquivalenceClassCache
bool
,
disablePreemption
bool
,
)
scheduler
.
Configurator
{
)
scheduler
.
Configurator
{
stopEverything
:=
make
(
chan
struct
{})
stopEverything
:=
make
(
chan
struct
{})
schedulerCache
:=
schedulercache
.
New
(
30
*
time
.
Second
,
stopEverything
)
schedulerCache
:=
schedulercache
.
New
(
30
*
time
.
Second
,
stopEverything
)
...
@@ -179,6 +183,7 @@ func NewConfigFactory(
...
@@ -179,6 +183,7 @@ func NewConfigFactory(
schedulerName
:
schedulerName
,
schedulerName
:
schedulerName
,
hardPodAffinitySymmetricWeight
:
hardPodAffinitySymmetricWeight
,
hardPodAffinitySymmetricWeight
:
hardPodAffinitySymmetricWeight
,
enableEquivalenceClassCache
:
enableEquivalenceClassCache
,
enableEquivalenceClassCache
:
enableEquivalenceClassCache
,
disablePreemption
:
disablePreemption
,
}
}
c
.
scheduledPodsHasSynced
=
podInformer
.
Informer
()
.
HasSynced
c
.
scheduledPodsHasSynced
=
podInformer
.
Informer
()
.
HasSynced
...
@@ -1064,7 +1069,20 @@ func (c *configFactory) CreateFromKeys(predicateKeys, priorityKeys sets.String,
...
@@ -1064,7 +1069,20 @@ func (c *configFactory) CreateFromKeys(predicateKeys, priorityKeys sets.String,
glog
.
Info
(
"Created equivalence class cache"
)
glog
.
Info
(
"Created equivalence class cache"
)
}
}
algo
:=
core
.
NewGenericScheduler
(
c
.
schedulerCache
,
c
.
equivalencePodCache
,
c
.
podQueue
,
predicateFuncs
,
predicateMetaProducer
,
priorityConfigs
,
priorityMetaProducer
,
extenders
,
c
.
volumeBinder
,
c
.
pVCLister
,
c
.
alwaysCheckAllPredicates
)
algo
:=
core
.
NewGenericScheduler
(
c
.
schedulerCache
,
c
.
equivalencePodCache
,
c
.
podQueue
,
predicateFuncs
,
predicateMetaProducer
,
priorityConfigs
,
priorityMetaProducer
,
extenders
,
c
.
volumeBinder
,
c
.
pVCLister
,
c
.
alwaysCheckAllPredicates
,
c
.
disablePreemption
,
)
podBackoff
:=
util
.
CreateDefaultPodBackoff
()
podBackoff
:=
util
.
CreateDefaultPodBackoff
()
return
&
scheduler
.
Config
{
return
&
scheduler
.
Config
{
...
...
pkg/scheduler/factory/factory_test.go
View file @
4f0bd412
...
@@ -46,7 +46,10 @@ import (
...
@@ -46,7 +46,10 @@ import (
"k8s.io/kubernetes/pkg/scheduler/util"
"k8s.io/kubernetes/pkg/scheduler/util"
)
)
const
enableEquivalenceCache
=
true
const
(
enableEquivalenceCache
=
true
disablePodPreemption
=
false
)
func
TestCreate
(
t
*
testing
.
T
)
{
func
TestCreate
(
t
*
testing
.
T
)
{
handler
:=
utiltesting
.
FakeHandler
{
handler
:=
utiltesting
.
FakeHandler
{
...
@@ -533,6 +536,7 @@ func newConfigFactory(client *clientset.Clientset, hardPodAffinitySymmetricWeigh
...
@@ -533,6 +536,7 @@ func newConfigFactory(client *clientset.Clientset, hardPodAffinitySymmetricWeigh
informerFactory
.
Storage
()
.
V1
()
.
StorageClasses
(),
informerFactory
.
Storage
()
.
V1
()
.
StorageClasses
(),
hardPodAffinitySymmetricWeight
,
hardPodAffinitySymmetricWeight
,
enableEquivalenceCache
,
enableEquivalenceCache
,
disablePodPreemption
,
)
)
}
}
...
...
pkg/scheduler/scheduler.go
View file @
4f0bd412
...
@@ -137,6 +137,9 @@ type Config struct {
...
@@ -137,6 +137,9 @@ type Config struct {
// VolumeBinder handles PVC/PV binding for the pod.
// VolumeBinder handles PVC/PV binding for the pod.
VolumeBinder
*
volumebinder
.
VolumeBinder
VolumeBinder
*
volumebinder
.
VolumeBinder
// Disable pod preemption or not.
DisablePreemption
bool
}
}
// NewFromConfigurator returns a new scheduler that is created entirely by the Configurator. Assumes Create() is implemented.
// NewFromConfigurator returns a new scheduler that is created entirely by the Configurator. Assumes Create() is implemented.
...
@@ -207,8 +210,9 @@ func (sched *Scheduler) schedule(pod *v1.Pod) (string, error) {
...
@@ -207,8 +210,9 @@ func (sched *Scheduler) schedule(pod *v1.Pod) (string, error) {
// If it succeeds, it adds the name of the node where preemption has happened to the pod annotations.
// If it succeeds, it adds the name of the node where preemption has happened to the pod annotations.
// It returns the node name and an error if any.
// It returns the node name and an error if any.
func
(
sched
*
Scheduler
)
preempt
(
preemptor
*
v1
.
Pod
,
scheduleErr
error
)
(
string
,
error
)
{
func
(
sched
*
Scheduler
)
preempt
(
preemptor
*
v1
.
Pod
,
scheduleErr
error
)
(
string
,
error
)
{
if
!
util
.
PodPriorityEnabled
()
{
if
!
util
.
PodPriorityEnabled
()
||
sched
.
config
.
DisablePreemption
{
glog
.
V
(
3
)
.
Infof
(
"Pod priority feature is not enabled. No preemption is performed."
)
glog
.
V
(
3
)
.
Infof
(
"Pod priority feature is not enabled or preemption is disabled by scheduler configuration."
+
" No preemption is performed."
)
return
""
,
nil
return
""
,
nil
}
}
preemptor
,
err
:=
sched
.
config
.
PodPreemptor
.
GetUpdatedPod
(
preemptor
)
preemptor
,
err
:=
sched
.
config
.
PodPreemptor
.
GetUpdatedPod
(
preemptor
)
...
...
pkg/scheduler/scheduler_test.go
View file @
4f0bd412
...
@@ -548,6 +548,7 @@ func setupTestScheduler(queuedPodStore *clientcache.FIFO, scache schedulercache.
...
@@ -548,6 +548,7 @@ func setupTestScheduler(queuedPodStore *clientcache.FIFO, scache schedulercache.
[]
algorithm
.
SchedulerExtender
{},
[]
algorithm
.
SchedulerExtender
{},
nil
,
nil
,
schedulertesting
.
FakePersistentVolumeClaimLister
{},
schedulertesting
.
FakePersistentVolumeClaimLister
{},
false
,
false
)
false
)
bindingChan
:=
make
(
chan
*
v1
.
Binding
,
1
)
bindingChan
:=
make
(
chan
*
v1
.
Binding
,
1
)
errChan
:=
make
(
chan
error
,
1
)
errChan
:=
make
(
chan
error
,
1
)
...
@@ -596,6 +597,7 @@ func setupTestSchedulerLongBindingWithRetry(queuedPodStore *clientcache.FIFO, sc
...
@@ -596,6 +597,7 @@ func setupTestSchedulerLongBindingWithRetry(queuedPodStore *clientcache.FIFO, sc
[]
algorithm
.
SchedulerExtender
{},
[]
algorithm
.
SchedulerExtender
{},
nil
,
nil
,
schedulertesting
.
FakePersistentVolumeClaimLister
{},
schedulertesting
.
FakePersistentVolumeClaimLister
{},
false
,
false
)
false
)
bindingChan
:=
make
(
chan
*
v1
.
Binding
,
2
)
bindingChan
:=
make
(
chan
*
v1
.
Binding
,
2
)
configurator
:=
&
FakeConfigurator
{
configurator
:=
&
FakeConfigurator
{
...
...
test/integration/scheduler/util.go
View file @
4f0bd412
...
@@ -85,6 +85,7 @@ func createConfiguratorWithPodInformer(
...
@@ -85,6 +85,7 @@ func createConfiguratorWithPodInformer(
informerFactory
.
Storage
()
.
V1
()
.
StorageClasses
(),
informerFactory
.
Storage
()
.
V1
()
.
StorageClasses
(),
v1
.
DefaultHardPodAffinitySymmetricWeight
,
v1
.
DefaultHardPodAffinitySymmetricWeight
,
utilfeature
.
DefaultFeatureGate
.
Enabled
(
features
.
EnableEquivalenceClassCache
),
utilfeature
.
DefaultFeatureGate
.
Enabled
(
features
.
EnableEquivalenceClassCache
),
false
,
)
)
}
}
...
...
test/integration/util/util.go
View file @
4f0bd412
...
@@ -112,5 +112,6 @@ func createSchedulerConfigurator(
...
@@ -112,5 +112,6 @@ func createSchedulerConfigurator(
informerFactory
.
Storage
()
.
V1
()
.
StorageClasses
(),
informerFactory
.
Storage
()
.
V1
()
.
StorageClasses
(),
v1
.
DefaultHardPodAffinitySymmetricWeight
,
v1
.
DefaultHardPodAffinitySymmetricWeight
,
utilfeature
.
DefaultFeatureGate
.
Enabled
(
features
.
EnableEquivalenceClassCache
),
utilfeature
.
DefaultFeatureGate
.
Enabled
(
features
.
EnableEquivalenceClassCache
),
false
,
)
)
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment