Skip to content

Commit 54eed52

Browse files
committed
Properly configure namespace selector
This accidentally did not get `if`-wrapped in eaa2a8c, breaking the configuration option to watch a single namespace, and thereby as by-effect the breakage of sharding. Signed-off-by: Hidde Beydals <[email protected]>
1 parent b993ca3 commit 54eed52

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

main.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,10 @@ func main() {
228228
},
229229
}
230230

231-
mgrConfig.Cache.DefaultNamespaces = map[string]ctrlcache.Config{
232-
watchNamespace: {},
231+
if watchNamespace != "" {
232+
mgrConfig.Cache.DefaultNamespaces = map[string]ctrlcache.Config{
233+
watchNamespace: ctrlcache.Config{},
234+
}
233235
}
234236

235237
mgr, err := ctrl.NewManager(restConfig, mgrConfig)

0 commit comments

Comments
 (0)