Skip to content

Commit

Permalink
Do not append 'namespaceAll' to managed namespaces on initialization.
Browse files Browse the repository at this point in the history
  • Loading branch information
naemono committed Dec 13, 2021
1 parent 9ddb3cf commit 62804ac
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -479,12 +479,12 @@ func startOperator(ctx context.Context) error {
// The managed cache should always include the operator namespace so that we can work with operator-internal resources.
managedNamespaces = append(managedNamespaces, operatorNamespace)

opts.NewCache = cache.MultiNamespacedCacheBuilder(managedNamespaces)

// Add the empty namespace to allow watching cluster-scoped resources if storage class validation is enabled.
if viper.GetBool(operator.ValidateStorageClassFlag) {
managedNamespaces = append(managedNamespaces, "")
opts.NewCache = cache.MultiNamespacedCacheBuilder(append(managedNamespaces, ""))
}

opts.NewCache = cache.MultiNamespacedCacheBuilder(managedNamespaces)
}

// only expose prometheus metrics if provided a non-zero port
Expand Down

0 comments on commit 62804ac

Please sign in to comment.