Skip to content

Commit

Permalink
Merge pull request #52 from Nordix/krm-garbage-collector
Browse files Browse the repository at this point in the history
#574 - Update garbage collector code to reclaim pods in the namespace which are only krm functions
  • Loading branch information
nephio-prow[bot] authored May 16, 2024
2 parents 9baabd0 + 242ec53 commit 2038769
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion func/internal/podevaluator.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2038769

Please sign in to comment.