Skip to content

Commit e6797ba

Browse files
committed
Listing fixes
1 parent 9f61997 commit e6797ba

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pkg/ext-proc/backend/datastore.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,10 @@ func (ds *K8sDatastore) LabelsMatch(podLabels map[string]string) bool {
124124

125125
func (ds *K8sDatastore) flushPodsAndRefetch(ctx context.Context, ctrlClient client.Client, newServerPool *v1alpha1.InferencePool) {
126126
podList := &corev1.PodList{}
127-
if err := ctrlClient.List(ctx, podList, selectorFromInferencePoolSelector(newServerPool.Spec.Selector).(client.MatchingLabelsSelector)); err != nil {
127+
if err := ctrlClient.List(ctx, podList, &client.ListOptions{
128+
LabelSelector: selectorFromInferencePoolSelector(newServerPool.Spec.Selector),
129+
Namespace: newServerPool.Namespace,
130+
}); err != nil {
128131
klog.Error(err, "error listing clients")
129132
}
130133
podMap := sync.Map{}

0 commit comments

Comments
 (0)