We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 19cf5db commit 2425666Copy full SHA for 2425666
pkg/cache/clusterscoped_cache.go
@@ -50,14 +50,18 @@ func MultiClusterCacheBuilder(clusterNames []string) NewCacheFunc {
50
caches := map[string]Cache{}
51
52
// create aglobal cache for * scope
53
- gCache, err := New(config, opts)
+ globalConfig := *config
54
+ globalConfig.Host = globalConfig.Host + "/clusters/*"
55
+ gCache, err := New(&globalConfig, opts)
56
if err != nil {
57
return nil, fmt.Errorf("error creating global cache %v", err)
58
}
59
60
for _, cs := range clusterNames {
61
+ scopedConfig := *config
62
+ scopedConfig.Host = config.Host + "/clusters/" + cs
63
opts.ClusterName = cs
- c, err := New(config, opts)
64
+ c, err := New(&scopedConfig, opts)
65
66
return nil, err
67
0 commit comments