Skip to content

Commit 27955fb

Browse files
committed
i guess it works?
1 parent 9fd8151 commit 27955fb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/cache/internal/cache_reader.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import (
2929
"k8s.io/apimachinery/pkg/runtime/schema"
3030
"k8s.io/apimachinery/pkg/selection"
3131
"k8s.io/client-go/tools/cache"
32+
"k8s.io/client-go/tools/clusters"
3233

3334
"sigs.k8s.io/controller-runtime/pkg/client"
3435
)
@@ -61,8 +62,11 @@ func (c *CacheReader) Get(_ context.Context, key client.ObjectKey, out client.Ob
6162
if c.scopeName == apimeta.RESTScopeNameRoot {
6263
key.Namespace = ""
6364
}
65+
key.Name = clusters.ToClusterAwareKey(out.GetClusterName(), key.Name)
66+
6467
storeKey := objectKeyToStoreKey(key)
6568
fmt.Println("storeKey", storeKey)
69+
fmt.Println("c.Indexer.ListKeys()", c.indexer.ListKeys())
6670

6771
// Lookup the object from the indexer cache
6872
obj, exists, err := c.indexer.GetByKey(storeKey)

0 commit comments

Comments
 (0)