From a1ff84cbeb2c648e3e8f91f7c6a3bd7d2c768d8c Mon Sep 17 00:00:00 2001 From: Chitsing KUI Date: Tue, 6 Feb 2024 15:46:44 +0800 Subject: [PATCH] Fix: add ns filter to podLister (#622) --- pkg/controller/mpi_job_controller.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/controller/mpi_job_controller.go b/pkg/controller/mpi_job_controller.go index c161de9e..d6b2ffc1 100644 --- a/pkg/controller/mpi_job_controller.go +++ b/pkg/controller/mpi_job_controller.go @@ -808,7 +808,7 @@ func (c *MPIJobController) getRunningWorkerPods(mpiJob *kubeflow.MPIJob) ([]*cor if err != nil { return nil, err } - podFullList, err := c.podLister.List(selector) + podFullList, err := c.podLister.Pods(mpiJob.Namespace).List(selector) if err != nil { return nil, err } @@ -956,7 +956,7 @@ func (c *MPIJobController) getOrCreateWorker(mpiJob *kubeflow.MPIJob) ([]*corev1 if err != nil { return nil, err } - podFullList, err := c.podLister.List(selector) + podFullList, err := c.podLister.Pods(mpiJob.Namespace).List(selector) if err != nil { return nil, err }