mirror of
https://github.com/amir20/dozzle.git
synced 2025-12-21 13:23:07 +01:00
feat: supports multiple namespaces for k8s (#3848)
This commit is contained in:
@@ -31,7 +31,7 @@ type Args struct {
|
||||
Mode string `arg:"env:DOZZLE_MODE" default:"server" help:"sets the mode to run in (server, swarm)"`
|
||||
TimeoutString string `arg:"--timeout,env:DOZZLE_TIMEOUT" default:"10s" help:"sets the timeout for docker client"`
|
||||
Timeout time.Duration `arg:"-"`
|
||||
Namespace string `arg:"env:DOZZLE_NAMESPACE" default:"" help:"sets the namespace to use in k8s"`
|
||||
Namespace []string `arg:"env:DOZZLE_NAMESPACE" help:"sets the namespace to use in k8s"`
|
||||
Healthcheck *HealthcheckCmd `arg:"subcommand:healthcheck" help:"checks if the server is running"`
|
||||
Generate *GenerateCmd `arg:"subcommand:generate" help:"generates a configuration file for simple auth"`
|
||||
Agent *AgentCmd `arg:"subcommand:agent" help:"starts the agent"`
|
||||
@@ -72,6 +72,10 @@ func ParseArgs() (Args, interface{}) {
|
||||
args.RemoteHost[i] = strings.TrimSpace(value)
|
||||
}
|
||||
|
||||
for i, value := range args.Namespace {
|
||||
args.Namespace[i] = strings.TrimSpace(value)
|
||||
}
|
||||
|
||||
if args.TimeoutString != "" {
|
||||
timeout, err := time.ParseDuration(args.TimeoutString)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user