Skip to content

Commit

Permalink
Properly configure namespace selector
Browse files Browse the repository at this point in the history
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 <hidde@hhh.computer>
  • Loading branch information
hiddeco committed Dec 19, 2023
1 parent b993ca3 commit 4897eaa
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,10 @@ func main() {
},
}

mgrConfig.Cache.DefaultNamespaces = map[string]ctrlcache.Config{
watchNamespace: {},
if watchNamespace != "" {
mgrConfig.Cache.DefaultNamespaces = map[string]ctrlcache.Config{
watchNamespace: {},
}
}

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

0 comments on commit 4897eaa

Please sign in to comment.