feature(scheduler): won't run Filter if PreFilter returned a Skip status

This commit is contained in:
Kensei Nakada
2023-01-05 17:48:46 +00:00
parent c1ca3191d5
commit e5b536755f
8 changed files with 406 additions and 47 deletions

View File

@@ -44,10 +44,6 @@ func TestNodeAffinity(t *testing.T) {
args config.NodeAffinityArgs
disablePreFilter bool
}{
{
name: "no selector",
pod: &v1.Pod{},
},
{
name: "missing labels",
pod: st.MakePod().NodeSelector(map[string]string{
@@ -285,6 +281,7 @@ func TestNodeAffinity(t *testing.T) {
labels: map[string]string{
"foo": "bar",
},
wantPreFilterStatus: framework.NewStatus(framework.Skip),
},
{
name: "Pod with Affinity but nil NodeSelector will schedule onto a node",
@@ -300,6 +297,7 @@ func TestNodeAffinity(t *testing.T) {
labels: map[string]string{
"foo": "bar",
},
wantPreFilterStatus: framework.NewStatus(framework.Skip),
},
{
name: "Pod with multiple matchExpressions ANDed that matches the existing node",