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 a5a6cc3 commit 50d68ddCopy full SHA for 50d68dd
cmd/manager/main.go
@@ -573,7 +573,11 @@ func startOperator(ctx context.Context) error {
573
574
// configure the manager cache based on the number of managed namespaces
575
var managedNamespaces []string
576
- viper.UnmarshalKey(operator.NamespacesFlag, &managedNamespaces)
+ // 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