From e113f4b7c5af6155893f0bb07c45de18297a95fd Mon Sep 17 00:00:00 2001 From: Jayson Wang Date: Mon, 25 Dec 2023 13:48:59 +0800 Subject: [PATCH] get node filtering params from matching context values (#2375) --- internal/dao/pod.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/dao/pod.go b/internal/dao/pod.go index 4c11879f..f426f4ef 100644 --- a/internal/dao/pod.go +++ b/internal/dao/pod.go @@ -98,7 +98,7 @@ func (p *Pod) List(ctx context.Context, ns string) ([]runtime.Object, error) { if withMx, ok := ctx.Value(internal.KeyWithMetrics).(bool); ok && withMx { pmx, _ = client.DialMetrics(p.Client()).FetchPodsMetricsMap(ctx, ns) } - sel, _ := ctx.Value(internal.KeyLabels).(string) + sel, _ := ctx.Value(internal.KeyFields).(string) fsel, err := labels.ConvertSelectorToLabelsMap(sel) if err != nil { return nil, err