Skip to content

Commit

Permalink
initialise default namespaces map config
Browse files Browse the repository at this point in the history
  • Loading branch information
wildum committed Oct 10, 2023
1 parent 7d7b715 commit 7c61fbd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/operator/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,10 @@ func (c *Config) registerFlags(f *flag.FlagSet) error {

c.Controller.WebhookServer = webhook.NewServer(webhookServerOptions)

c.Controller.Cache.DefaultNamespaces[namespace] = cache.Config{}
if namespace != "" {
c.Controller.Cache.DefaultNamespaces = map[string]cache.Config{}
c.Controller.Cache.DefaultNamespaces[namespace] = cache.Config{}
}

// Custom initial values for the endpoint names.
c.Controller.ReadinessEndpointName = "/-/ready"
Expand Down

0 comments on commit 7c61fbd

Please sign in to comment.