Skip to content

Commit

Permalink
fix: nil map entry when watch namespace is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
yashmehrotra authored and moshloop committed Sep 12, 2024
1 parent 6f3874c commit 0c62ed0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ func run(cmd *cobra.Command, args []string) {
}

if runner.WatchNamespace != "" {
if managerOpt.Cache.DefaultNamespaces == nil {
managerOpt.Cache.DefaultNamespaces = make(map[string]ctrlCache.Config)
}
managerOpt.Cache.DefaultNamespaces[runner.WatchNamespace] = ctrlCache.Config{}
}

Expand Down

0 comments on commit 0c62ed0

Please sign in to comment.