Skip to content

Commit 3652065

Browse files
authored
remove arg validation on optional parameter (#136)
1 parent f6fdf2c commit 3652065

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pkg/cmd/ctlstore/main.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ type reflectorCliConfig struct {
7878
}
7979

8080
type multiReflectorConfig struct {
81-
LDBPaths []string `conf:"ldb-paths" help:"list of ldbs, each ldb is managed by a unique reflector" validate:"nonzero"`
81+
LDBPaths []string `conf:"ldb-paths" help:"list of ldbs, each ldb is managed by a unique reflector"`
8282
}
8383

8484
type executiveCliConfig struct {
@@ -495,6 +495,10 @@ func multiReflector(ctx context.Context, args []string) {
495495
enableDebug()
496496
}
497497

498+
if len(cliCfg.MultiReflector.LDBPaths) <= 1 {
499+
panic("multi-reflector mode requires at least 2 ldb paths")
500+
}
501+
498502
var promHandler *prometheus.Handler
499503
if len(cliCfg.MetricsBind) > 0 {
500504
promHandler = &prometheus.Handler{}

0 commit comments

Comments
 (0)