get node filtering params from matching context values (#2375)

mine
Jayson Wang 2023-12-25 13:48:59 +08:00 committed by GitHub
parent defad7a174
commit e113f4b7c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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