File tree Expand file tree Collapse file tree
pkg/epp/framework/plugins/requestcontrol/screener/disaggregatedsetrollout Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ import (
3434 fwkrc "github.com/llm-d/llm-d-router/pkg/epp/framework/interface/requestcontrol"
3535 fwksched "github.com/llm-d/llm-d-router/pkg/epp/framework/interface/scheduling"
3636 sourcenotifications "github.com/llm-d/llm-d-router/pkg/epp/framework/plugins/datalayer/source/notifications"
37+ podutil "github.com/llm-d/llm-d-router/pkg/epp/util/pod"
3738)
3839
3940const (
@@ -205,7 +206,7 @@ func (c *Screener) acceptsPod(pod *corev1.Pod) bool {
205206 if pod == nil || ! c .config .RevisionGating .Active () {
206207 return false
207208 }
208- if ! c .scope .Matches (labels .Set (pod .Labels )) || ! isPodReady (pod ) {
209+ if ! c .scope .Matches (labels .Set (pod .Labels )) || ! podutil . IsPodReady (pod ) {
209210 return false
210211 }
211212 return pod .Labels [c .revisionLabelKey ] != "" && pod .Labels [c .roleLabelKey ] != ""
@@ -298,15 +299,3 @@ func (c *Screener) distributionSnapshot() revisionDistribution {
298299 defer c .mu .RUnlock ()
299300 return c .distribution
300301}
301-
302- func isPodReady (pod * corev1.Pod ) bool {
303- if pod == nil || pod .Status .Phase != corev1 .PodRunning || pod .DeletionTimestamp != nil {
304- return false
305- }
306- for _ , condition := range pod .Status .Conditions {
307- if condition .Type == corev1 .PodReady {
308- return condition .Status == corev1 .ConditionTrue
309- }
310- }
311- return false
312- }
You can’t perform that action at this time.
0 commit comments