scheduler: add ResourceClass events

When filtering fails because a ResourceClass is missing, we can treat the pod
as "unschedulable" as long as we then also register a cluster event that wakes
up the pod. This is more efficient than periodically retrying.
This commit is contained in:
Patrick Ohly
2023-08-28 18:02:00 +02:00
parent 5269e76990
commit c682d2b8c5
5 changed files with 82 additions and 2 deletions

View File

@@ -331,7 +331,7 @@ func TestPlugin(t *testing.T) {
claims: []*resourcev1alpha2.ResourceClaim{pendingDelayedClaim},
want: want{
prefilter: result{
status: framework.AsStatus(fmt.Errorf(`look up resource class: resourceclass.resource.k8s.io "%s" not found`, className)),
status: framework.NewStatus(framework.UnschedulableAndUnresolvable, fmt.Sprintf("resource class %s does not exist", className)),
},
postfilter: result{
status: framework.NewStatus(framework.Unschedulable, `no new claims to deallocate`),