admiraltyio / admiralty

A system of Kubernetes controllers that intelligently schedules workloads across clusters.
https://admiralty.io
Apache License 2.0
673 stars 87 forks source link

fix(proxy scheduler): exit filter step early when scheduling gates are found #212

Closed marwanad closed 1 week ago

marwanad commented 1 month ago

Motivation

We use admiralty alongside Kueue for scheduling plain pod workloads on the target clusters. For plain pod management, Kueue utilizes scheduling gates to block the scheduling cycle from running. The scheduling gate remains on the pod until Kueue admits the pod when quota is available. Pods that are scheduling gated don't have the PodReasonUnschedulable as the condition reason and therefore, may cause unnecessary delays in the filter step since it polls for the entirety of the 30 seconds waiting for PodReasonUnschedulable.

This fixes this logic to consider pods with scheduling gates as unschedulable.