mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-05 02:09:56 +00:00
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
This commit is contained in:
commit
740458255b
2
pkg/client/cache/listers.go
vendored
2
pkg/client/cache/listers.go
vendored
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user