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 89969ec commit a3d23deCopy full SHA for a3d23de
cmd/utils/flags.go
@@ -2,7 +2,9 @@ package utils
2
3
import (
4
"flag"
5
+ "fmt"
6
"path/filepath"
7
+ "regexp"
8
9
"github.com/spotahome/redis-operator/operator/redisfailover"
10
"k8s.io/client-go/util/homedir"
@@ -39,6 +41,10 @@ func (c *CMDFlags) Init() {
39
41
flag.StringVar(&c.LogLevel, "log-level", "info", "set log level")
40
42
// Parse flags
43
flag.Parse()
44
+
45
+ if _, err := regexp.Compile(c.SupportedNamespacesRegex); err != nil {
46
+ panic(fmt.Errorf("supported namespaces Regex is not valid: %w", err))
47
+ }
48
}
49
50
// ToRedisOperatorConfig convert the flags to redisfailover config
0 commit comments