Commit 74045825 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #34093 from wojtek-t/fix_index_listing

Automatic merge from submit-queue Fix call to Index call in listers This will actually eliminated all logs like this: ``` can not retrieve list of objects using index : object has no meta: object does not implement the Object interfaces ``` And it should also speed up different things (as so far we we basically not using indexes at all. @kubernetes/sig-api-machinery
parents a7f6557f c215bd0e
...@@ -62,7 +62,7 @@ func ListAllByNamespace(indexer Indexer, namespace string, selector labels.Selec ...@@ -62,7 +62,7 @@ func ListAllByNamespace(indexer Indexer, namespace string, selector labels.Selec
return nil return nil
} }
items, err := indexer.Index(NamespaceIndex, api.ObjectMeta{Namespace: namespace}) items, err := indexer.Index(NamespaceIndex, &api.ObjectMeta{Namespace: namespace})
if err != nil { if err != nil {
// Ignore error; do slow search without index. // Ignore error; do slow search without index.
glog.Warningf("can not retrieve list of objects using index : %v", err) glog.Warningf("can not retrieve list of objects using index : %v", err)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment