Skip to content

Commit 02fbbbe

Browse files
authored
Merge pull request #858 from fluxcd/fix-namespace-selector
Properly configure namespace selector
2 parents b993ca3 + 54eed52 commit 02fbbbe

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)