From 2d76c43c109e94ce3a365a5a0fa43b83db6aa919 Mon Sep 17 00:00:00 2001 From: Kushal Harish Naidu Date: Tue, 14 May 2024 11:13:19 +0000 Subject: [PATCH] update garbage collector to get list of pods which are krm functions Signed-off-by: Kushal Harish Naidu --- func/internal/podevaluator.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/func/internal/podevaluator.go b/func/internal/podevaluator.go index 6eedc74c..1b7c4649 100644 --- a/func/internal/podevaluator.go +++ b/func/internal/podevaluator.go @@ -318,7 +318,7 @@ func (pcm *podCacheManager) podCacheManager() { func (pcm *podCacheManager) garbageCollector() { var err error podList := &corev1.PodList{} - err = pcm.podManager.kubeClient.List(context.Background(), podList, client.InNamespace(pcm.podManager.namespace)) + err = pcm.podManager.kubeClient.List(context.Background(), podList, client.InNamespace(pcm.podManager.namespace), client.HasLabels{krmFunctionLabel}) if err != nil { klog.Warningf("unable to list pods in namespace %v: %v", pcm.podManager.namespace, err) return