diff --git a/internal/model/resource.go b/internal/model/resource.go index d4b7bd12..af485171 100644 --- a/internal/model/resource.go +++ b/internal/model/resource.go @@ -5,7 +5,6 @@ import ( "github.com/derailed/k9s/internal" "github.com/derailed/k9s/internal/render" - "github.com/rs/zerolog/log" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" ) @@ -23,7 +22,6 @@ func (r *Resource) Init(ns, gvr string, f Factory) { // List returns a collection of nodes. func (r *Resource) List(ctx context.Context) ([]runtime.Object, error) { - log.Debug().Msgf("MODELLIST %q:%q", r.namespace, r.gvr) strLabel, ok := ctx.Value(internal.KeyLabels).(string) lsel := labels.Everything() if sel, err := labels.ConvertSelectorToLabelsMap(strLabel); ok && err == nil { diff --git a/internal/watch/factory.go b/internal/watch/factory.go index 3e5d7198..fb25fa99 100644 --- a/internal/watch/factory.go +++ b/internal/watch/factory.go @@ -65,10 +65,10 @@ func (f *Factory) List(gvr, ns string, sel labels.Selector) ([]runtime.Object, e if err != nil { return nil, err } - log.Debug().Msgf("LISTING %q:%q", ns, gvr) if ns == clusterScope { return inf.Lister().List(sel) } + return inf.Lister().ByNamespace(ns).List(sel) } @@ -79,8 +79,6 @@ func (f *Factory) Get(gvr, path string, sel labels.Selector) (runtime.Object, er if err != nil { return nil, err } - log.Debug().Msgf("GETTING %q:%q", ns, gvr) - if ns == clusterScope { return inf.Lister().Get(n) }