Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
Signed-off-by: Pavol Loffay <[email protected]>
  • Loading branch information
pavolloffay committed Sep 1, 2023
1 parent 25da3c3 commit 333dabd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/cmd/start/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,6 @@ func createManager(ctx context.Context, cfg *rest.Config) manager.Manager {
probeAddr := viper.GetString("health-probe-bind-address")
webhookPort := viper.GetInt("webhook-bind-port")

namespace := viper.GetString(v1.ConfigWatchNamespace)

var tlsOpt tlsConfig
tlsOpt.minVersion = viper.GetString("tls-min-version")
tlsOpt.cipherSuites = viper.GetStringSlice("tls-cipher-suites")
Expand All @@ -275,8 +273,9 @@ func createManager(ctx context.Context, cfg *rest.Config) manager.Manager {
// Note that this is not intended to be used for excluding namespaces, this is better done via a Predicate
// Also note that you may face performance issues when using this with a high number of namespaces.
// More Info: https://godoc.org/github.com/kubernetes-sigs/controller-runtime/pkg/cache#MultiNamespacedCacheBuilder
namespace := viper.GetString(v1.ConfigWatchNamespace)
var namespaces map[string]cache.Config
if strings.Contains(namespace, ",") {
if namespace != "" {
namespaces = map[string]cache.Config{}
for _, ns := range strings.Split(namespace, ",") {
namespaces[ns] = cache.Config{}
Expand Down

0 comments on commit 333dabd

Please sign in to comment.