Skip to content

Commit

Permalink
add todo for the crdmanager namespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
wildum committed Oct 10, 2023
1 parent 0719d35 commit c54a50e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions component/prometheus/operator/common/crdmanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,8 @@ func (c *crdManager) runInformers(restConfig *rest.Config, ctx context.Context)
return fmt.Errorf("building label selector: %w", err)
}
for _, ns := range c.args.Namespaces {
// TODO: This is going down an unnecessary extra step in the cache when `c.args.Namespaces` defaults to NamespaceAll.
// This code path should be simplified and support a scenario when len(c.args.Namespace) == 0.
defaultNamespaces := map[string]cache.Config{}
defaultNamespaces[ns] = cache.Config{}
opts := cache.Options{
Expand Down

0 comments on commit c54a50e

Please sign in to comment.