Fix a bug that DefaultPreemption plugin is disabled when using scheduler policy

This commit is contained in:
Wei Huang
2020-11-10 17:46:37 -08:00
parent f102cc887e
commit 47a7c374c6
6 changed files with 38 additions and 11 deletions

View File

@@ -140,7 +140,7 @@ func TestCreateFromConfig(t *testing.T) {
{Name: "InterPodAffinity"},
},
},
PostFilter: &schedulerapi.PluginSet{},
PostFilter: &schedulerapi.PluginSet{Enabled: []schedulerapi.Plugin{{Name: "DefaultPreemption"}}},
PreScore: &schedulerapi.PluginSet{
Enabled: []schedulerapi.Plugin{
{Name: "PodTopologySpread"},
@@ -238,7 +238,7 @@ func TestCreateFromConfig(t *testing.T) {
{Name: "ServiceAffinity"},
},
},
PostFilter: &schedulerapi.PluginSet{},
PostFilter: &schedulerapi.PluginSet{Enabled: []schedulerapi.Plugin{{Name: "DefaultPreemption"}}},
PreScore: &schedulerapi.PluginSet{Enabled: []schedulerapi.Plugin{{Name: "InterPodAffinity"}}},
Score: &schedulerapi.PluginSet{
Enabled: []schedulerapi.Plugin{
@@ -313,7 +313,7 @@ func TestCreateFromConfig(t *testing.T) {
{Name: "ServiceAffinity"},
},
},
PostFilter: &schedulerapi.PluginSet{},
PostFilter: &schedulerapi.PluginSet{Enabled: []schedulerapi.Plugin{{Name: "DefaultPreemption"}}},
PreScore: &schedulerapi.PluginSet{Enabled: []schedulerapi.Plugin{{Name: "InterPodAffinity"}}},
Score: &schedulerapi.PluginSet{
Enabled: []schedulerapi.Plugin{