Skip to content

Commit 2425666

Browse files
committed
????
1 parent 19cf5db commit 2425666

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

pkg/cache/clusterscoped_cache.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,18 @@ func MultiClusterCacheBuilder(clusterNames []string) NewCacheFunc {
5050
caches := map[string]Cache{}
5151

5252
// create aglobal cache for * scope
53-
gCache, err := New(config, opts)
53+
globalConfig := *config
54+
globalConfig.Host = globalConfig.Host + "/clusters/*"
55+
gCache, err := New(&globalConfig, opts)
5456
if err != nil {
5557
return nil, fmt.Errorf("error creating global cache %v", err)
5658
}
5759

5860
for _, cs := range clusterNames {
61+
scopedConfig := *config
62+
scopedConfig.Host = config.Host + "/clusters/" + cs
5963
opts.ClusterName = cs
60-
c, err := New(config, opts)
64+
c, err := New(&scopedConfig, opts)
6165
if err != nil {
6266
return nil, err
6367
}

0 commit comments

Comments
 (0)