Add envVars for CLI arguments (#14114)

fixes #14107
This commit is contained in:
Harshavardhana 2022-01-15 16:20:02 -08:00 committed by GitHub
parent ba708f51f2
commit 60f2df54e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 8 deletions

View File

@ -51,23 +51,27 @@ import (
// ServerFlags - server command specific flags // ServerFlags - server command specific flags
var ServerFlags = []cli.Flag{ var ServerFlags = []cli.Flag{
cli.StringFlag{ cli.StringFlag{
Name: "address", Name: "address",
Value: ":" + GlobalMinioDefaultPort, Value: ":" + GlobalMinioDefaultPort,
Usage: "bind to a specific ADDRESS:PORT, ADDRESS can be an IP or hostname", Usage: "bind to a specific ADDRESS:PORT, ADDRESS can be an IP or hostname",
EnvVar: "MINIO_ADDRESS",
}, },
cli.IntFlag{ cli.IntFlag{
Name: "listeners", Name: "listeners",
Value: 1, Value: 1,
Usage: "bind N number of listeners per ADDRESS:PORT", Usage: "bind N number of listeners per ADDRESS:PORT",
EnvVar: "MINIO_LISTENERS",
}, },
cli.StringFlag{ cli.StringFlag{
Name: "console-address", Name: "console-address",
Usage: "bind to a specific ADDRESS:PORT for embedded Console UI, ADDRESS can be an IP or hostname", Usage: "bind to a specific ADDRESS:PORT for embedded Console UI, ADDRESS can be an IP or hostname",
EnvVar: "MINIO_CONSOLE_ADDRESS",
}, },
cli.DurationFlag{ cli.DurationFlag{
Name: "shutdown-timeout", Name: "shutdown-timeout",
Value: xhttp.DefaultShutdownTimeout, Value: xhttp.DefaultShutdownTimeout,
Usage: "shutdown timeout to gracefully shutdown server", Usage: "shutdown timeout to gracefully shutdown server",
EnvVar: "MINIO_SHUTDOWN_TIMEOUT",
Hidden: true, Hidden: true,
}, },
} }