diff --git a/cmd/balance-worker/main.go b/cmd/balance-worker/main.go index 8ce0c9df2..3a3274c67 100644 --- a/cmd/balance-worker/main.go +++ b/cmd/balance-worker/main.go @@ -61,6 +61,7 @@ func main() { flags.String("config", "", "Configuration file") flags.Bool("version", false, "Show version information") + flags.Bool("validate", false, "Validate configuration and exit") _ = flags.Parse(os.Args[1:]) @@ -92,6 +93,10 @@ func main() { os.Exit(1) } + if v, _ := flags.GetBool("validate"); v { + os.Exit(0) + } + extraResources, _ := resource.New( context.Background(), resource.WithContainer(), diff --git a/cmd/notification-service/main.go b/cmd/notification-service/main.go index 98f2dd171..de8e3f302 100644 --- a/cmd/notification-service/main.go +++ b/cmd/notification-service/main.go @@ -63,6 +63,7 @@ func main() { flags.String("config", "", "Configuration file") flags.Bool("version", false, "Show version information") + flags.Bool("validate", false, "Validate configuration and exit") _ = flags.Parse(os.Args[1:]) @@ -94,6 +95,10 @@ func main() { os.Exit(1) } + if v, _ := flags.GetBool("validate"); v { + os.Exit(0) + } + extraResources, _ := resource.New( context.Background(), resource.WithContainer(), diff --git a/cmd/server/main.go b/cmd/server/main.go index ba0ad67c6..3b18215c2 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -86,6 +86,7 @@ func main() { flags.String("config", "", "Configuration file") flags.Bool("version", false, "Show version information") + flags.Bool("validate", false, "Validate configuration and exit") _ = flags.Parse(os.Args[1:]) @@ -117,6 +118,10 @@ func main() { os.Exit(1) } + if v, _ := flags.GetBool("validate"); v { + os.Exit(0) + } + extraResources, _ := resource.New( context.Background(), resource.WithContainer(), diff --git a/cmd/sink-worker/main.go b/cmd/sink-worker/main.go index 19f8d5f14..2bed643c3 100644 --- a/cmd/sink-worker/main.go +++ b/cmd/sink-worker/main.go @@ -55,6 +55,7 @@ func main() { flags.String("config", "", "Configuration file") flags.Bool("version", false, "Show version information") + flags.Bool("validate", false, "Validate configuration and exit") _ = flags.Parse(os.Args[1:]) @@ -88,6 +89,10 @@ func main() { os.Exit(1) } + if v, _ := flags.GetBool("validate"); v { + os.Exit(0) + } + extraResources, _ := resource.New( ctx, resource.WithContainer(),