scheduler: parse Pod's Node affinity once in PreScore phase

Signed-off-by: SataQiu <1527062125@qq.com>
This commit is contained in:
SataQiu
2020-11-26 11:19:52 +08:00
parent b3fc888863
commit 2b38078de1
10 changed files with 134 additions and 19 deletions

View File

@@ -90,6 +90,7 @@ func TestClusterAutoscalerProvider(t *testing.T) {
{Name: interpodaffinity.Name},
{Name: podtopologyspread.Name},
{Name: tainttoleration.Name},
{Name: nodeaffinity.Name},
},
},
Score: &schedulerapi.PluginSet{
@@ -180,6 +181,7 @@ func TestApplyFeatureGates(t *testing.T) {
{Name: interpodaffinity.Name},
{Name: podtopologyspread.Name},
{Name: tainttoleration.Name},
{Name: nodeaffinity.Name},
},
},
Score: &schedulerapi.PluginSet{
@@ -260,6 +262,7 @@ func TestApplyFeatureGates(t *testing.T) {
{Name: interpodaffinity.Name},
{Name: podtopologyspread.Name},
{Name: tainttoleration.Name},
{Name: nodeaffinity.Name},
{Name: selectorspread.Name},
},
},