We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 289fcc0 commit 37b5117Copy full SHA for 37b5117
cmd/manager/main.go
@@ -572,7 +572,12 @@ func startOperator(ctx context.Context) error {
572
}
573
574
// configure the manager cache based on the number of managed namespaces
575
- managedNamespaces := viper.GetStringSlice(operator.NamespacesFlag)
+ var managedNamespaces []string
576
+ // do not use viper.GetStringSlice here as it suffers from https://github.com/spf13/viper/issues/380
577
+ if err := viper.UnmarshalKey(operator.NamespacesFlag, &managedNamespaces); err != nil {
578
+ log.Error(err, "Failed to parse managed namespaces flag")
579
+ return err
580
+ }
581
switch {
582
case len(managedNamespaces) == 0:
583
log.Info("Operator configured to manage all namespaces")
0 commit comments