Skip to content

Commit

Permalink
fix(cli): Reinstate --gloglevel flag. Fixes argoproj#4093 (argoproj#4100
Browse files Browse the repository at this point in the history
)
  • Loading branch information
alexec committed Sep 23, 2020
1 parent c4d9102 commit fafc5a9
Show file tree
Hide file tree
Showing 52 changed files with 92 additions and 9 deletions.
4 changes: 2 additions & 2 deletions api/openapi-spec/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
],
"swagger": "2.0",
"info": {
"description": "Argo",
"title": "Argo",
"description": "You can get examples of requests and responses by using the CLI with `--gloglevel=9`, e.g. `argo list --gloglevel=9`",
"title": "Argo Server API",
"version": "latest"
},
"paths": {
Expand Down
5 changes: 4 additions & 1 deletion cmd/argo/commands/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,21 @@ func NewCommand() *cobra.Command {

client.AddKubectlFlagsToCmd(command)
client.AddAPIClientFlagsToCmd(command)

// global log level
var logLevel string
var glogLevel int
var verbose bool
command.PersistentPreRun = func(cmd *cobra.Command, args []string) {
if verbose {
logLevel = "debug"
glogLevel = 6
}
cli.SetLogLevel(logLevel)
cli.SetGLogLevel(glogLevel)
log.WithField("version", argo.GetVersion()).Debug("CLI version")
}
command.PersistentFlags().StringVar(&logLevel, "loglevel", "info", "Set the logging level. One of: debug|info|warn|error")
command.PersistentFlags().IntVar(&glogLevel, "gloglevel", 0, "Set the glog logging level")
command.PersistentFlags().BoolVarP(&verbose, "verbose", "v", false, "Enabled verbose logging, i.e. --loglevel debug")

return command
Expand Down
1 change: 1 addition & 0 deletions docs/cli/argo.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ If you're using the Argo Server (e.g. because you need large workflow support or
--client-key string Path to a client key file for TLS
--cluster string The name of the kubeconfig cluster to use
--context string The name of the kubeconfig context to use
--gloglevel int Set the glog logging level
-h, --help help for argo
--insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure
-k, --insecure-skip-verify If true, the Argo Server's certificate will not be checked for validity. This will make your HTTPS connections insecure. Defaults to the ARGO_INSECURE_SKIP_VERIFY environment variable.
Expand Down
1 change: 1 addition & 0 deletions docs/cli/argo_archive.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ argo archive [flags]
--client-key string Path to a client key file for TLS
--cluster string The name of the kubeconfig cluster to use
--context string The name of the kubeconfig context to use
--gloglevel int Set the glog logging level
--insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure
-k, --insecure-skip-verify If true, the Argo Server's certificate will not be checked for validity. This will make your HTTPS connections insecure. Defaults to the ARGO_INSECURE_SKIP_VERIFY environment variable.
--instanceid string submit with a specific controller's instance id label. Default to the ARGO_INSTANCEID environment variable.
Expand Down
1 change: 1 addition & 0 deletions docs/cli/argo_archive_delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ argo archive delete UID... [flags]
--client-key string Path to a client key file for TLS
--cluster string The name of the kubeconfig cluster to use
--context string The name of the kubeconfig context to use
--gloglevel int Set the glog logging level
--insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure
-k, --insecure-skip-verify If true, the Argo Server's certificate will not be checked for validity. This will make your HTTPS connections insecure. Defaults to the ARGO_INSECURE_SKIP_VERIFY environment variable.
--instanceid string submit with a specific controller's instance id label. Default to the ARGO_INSTANCEID environment variable.
Expand Down
1 change: 1 addition & 0 deletions docs/cli/argo_archive_get.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ argo archive get UID [flags]
--client-key string Path to a client key file for TLS
--cluster string The name of the kubeconfig cluster to use
--context string The name of the kubeconfig context to use
--gloglevel int Set the glog logging level
--insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure
-k, --insecure-skip-verify If true, the Argo Server's certificate will not be checked for validity. This will make your HTTPS connections insecure. Defaults to the ARGO_INSECURE_SKIP_VERIFY environment variable.
--instanceid string submit with a specific controller's instance id label. Default to the ARGO_INSTANCEID environment variable.
Expand Down
1 change: 1 addition & 0 deletions docs/cli/argo_archive_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ argo archive list [flags]
--client-key string Path to a client key file for TLS
--cluster string The name of the kubeconfig cluster to use
--context string The name of the kubeconfig context to use
--gloglevel int Set the glog logging level
--insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure
-k, --insecure-skip-verify If true, the Argo Server's certificate will not be checked for validity. This will make your HTTPS connections insecure. Defaults to the ARGO_INSECURE_SKIP_VERIFY environment variable.
--instanceid string submit with a specific controller's instance id label. Default to the ARGO_INSTANCEID environment variable.
Expand Down
1 change: 1 addition & 0 deletions docs/cli/argo_auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ argo auth [flags]
--client-key string Path to a client key file for TLS
--cluster string The name of the kubeconfig cluster to use
--context string The name of the kubeconfig context to use
--gloglevel int Set the glog logging level
--insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure
-k, --insecure-skip-verify If true, the Argo Server's certificate will not be checked for validity. This will make your HTTPS connections insecure. Defaults to the ARGO_INSECURE_SKIP_VERIFY environment variable.
--instanceid string submit with a specific controller's instance id label. Default to the ARGO_INSTANCEID environment variable.
Expand Down
1 change: 1 addition & 0 deletions docs/cli/argo_auth_token.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ argo auth token [flags]
--client-key string Path to a client key file for TLS
--cluster string The name of the kubeconfig cluster to use
--context string The name of the kubeconfig context to use
--gloglevel int Set the glog logging level
--insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure
-k, --insecure-skip-verify If true, the Argo Server's certificate will not be checked for validity. This will make your HTTPS connections insecure. Defaults to the ARGO_INSECURE_SKIP_VERIFY environment variable.
--instanceid string submit with a specific controller's instance id label. Default to the ARGO_INSTANCEID environment variable.
Expand Down
1 change: 1 addition & 0 deletions docs/cli/argo_cluster-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ argo cluster-template [flags]
--client-key string Path to a client key file for TLS
--cluster string The name of the kubeconfig cluster to use
--context string The name of the kubeconfig context to use
--gloglevel int Set the glog logging level
--insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure
-k, --insecure-skip-verify If true, the Argo Server's certificate will not be checked for validity. This will make your HTTPS connections insecure. Defaults to the ARGO_INSECURE_SKIP_VERIFY environment variable.
--instanceid string submit with a specific controller's instance id label. Default to the ARGO_INSTANCEID environment variable.
Expand Down
1 change: 1 addition & 0 deletions docs/cli/argo_cluster-template_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ argo cluster-template create FILE1 FILE2... [flags]
--client-key string Path to a client key file for TLS
--cluster string The name of the kubeconfig cluster to use
--context string The name of the kubeconfig context to use
--gloglevel int Set the glog logging level
--insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure
-k, --insecure-skip-verify If true, the Argo Server's certificate will not be checked for validity. This will make your HTTPS connections insecure. Defaults to the ARGO_INSECURE_SKIP_VERIFY environment variable.
--instanceid string submit with a specific controller's instance id label. Default to the ARGO_INSTANCEID environment variable.
Expand Down
1 change: 1 addition & 0 deletions docs/cli/argo_cluster-template_delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ argo cluster-template delete WORKFLOW_TEMPLATE [flags]
--client-key string Path to a client key file for TLS
--cluster string The name of the kubeconfig cluster to use
--context string The name of the kubeconfig context to use
--gloglevel int Set the glog logging level
--insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure
-k, --insecure-skip-verify If true, the Argo Server's certificate will not be checked for validity. This will make your HTTPS connections insecure. Defaults to the ARGO_INSECURE_SKIP_VERIFY environment variable.
--instanceid string submit with a specific controller's instance id label. Default to the ARGO_INSTANCEID environment variable.
Expand Down
1 change: 1 addition & 0 deletions docs/cli/argo_cluster-template_get.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ argo cluster-template get CLUSTER WORKFLOW_TEMPLATE... [flags]
--client-key string Path to a client key file for TLS
--cluster string The name of the kubeconfig cluster to use
--context string The name of the kubeconfig context to use
--gloglevel int Set the glog logging level
--insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure
-k, --insecure-skip-verify If true, the Argo Server's certificate will not be checked for validity. This will make your HTTPS connections insecure. Defaults to the ARGO_INSECURE_SKIP_VERIFY environment variable.
--instanceid string submit with a specific controller's instance id label. Default to the ARGO_INSTANCEID environment variable.
Expand Down
1 change: 1 addition & 0 deletions docs/cli/argo_cluster-template_lint.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ argo cluster-template lint FILE... [flags]
--client-key string Path to a client key file for TLS
--cluster string The name of the kubeconfig cluster to use
--context string The name of the kubeconfig context to use
--gloglevel int Set the glog logging level
--insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure
-k, --insecure-skip-verify If true, the Argo Server's certificate will not be checked for validity. This will make your HTTPS connections insecure. Defaults to the ARGO_INSECURE_SKIP_VERIFY environment variable.
--instanceid string submit with a specific controller's instance id label. Default to the ARGO_INSTANCEID environment variable.
Expand Down
1 change: 1 addition & 0 deletions docs/cli/argo_cluster-template_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ argo cluster-template list [flags]
--client-key string Path to a client key file for TLS
--cluster string The name of the kubeconfig cluster to use
--context string The name of the kubeconfig context to use
--gloglevel int Set the glog logging level
--insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure
-k, --insecure-skip-verify If true, the Argo Server's certificate will not be checked for validity. This will make your HTTPS connections insecure. Defaults to the ARGO_INSECURE_SKIP_VERIFY environment variable.
--instanceid string submit with a specific controller's instance id label. Default to the ARGO_INSTANCEID environment variable.
Expand Down
1 change: 1 addition & 0 deletions docs/cli/argo_completion.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ argo completion SHELL [flags]
--client-key string Path to a client key file for TLS
--cluster string The name of the kubeconfig cluster to use
--context string The name of the kubeconfig context to use
--gloglevel int Set the glog logging level
--insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure
-k, --insecure-skip-verify If true, the Argo Server's certificate will not be checked for validity. This will make your HTTPS connections insecure. Defaults to the ARGO_INSECURE_SKIP_VERIFY environment variable.
--instanceid string submit with a specific controller's instance id label. Default to the ARGO_INSTANCEID environment variable.
Expand Down
1 change: 1 addition & 0 deletions docs/cli/argo_cron.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ argo cron [flags]
--client-key string Path to a client key file for TLS
--cluster string The name of the kubeconfig cluster to use
--context string The name of the kubeconfig context to use
--gloglevel int Set the glog logging level
--insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure
-k, --insecure-skip-verify If true, the Argo Server's certificate will not be checked for validity. This will make your HTTPS connections insecure. Defaults to the ARGO_INSECURE_SKIP_VERIFY environment variable.
--instanceid string submit with a specific controller's instance id label. Default to the ARGO_INSTANCEID environment variable.
Expand Down
1 change: 1 addition & 0 deletions docs/cli/argo_cron_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ argo cron create FILE1 FILE2... [flags]
--client-key string Path to a client key file for TLS
--cluster string The name of the kubeconfig cluster to use
--context string The name of the kubeconfig context to use
--gloglevel int Set the glog logging level
--insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure
-k, --insecure-skip-verify If true, the Argo Server's certificate will not be checked for validity. This will make your HTTPS connections insecure. Defaults to the ARGO_INSECURE_SKIP_VERIFY environment variable.
--instanceid string submit with a specific controller's instance id label. Default to the ARGO_INSTANCEID environment variable.
Expand Down
1 change: 1 addition & 0 deletions docs/cli/argo_cron_delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ argo cron delete [CRON_WORKFLOW... | --all] [flags]
--client-key string Path to a client key file for TLS
--cluster string The name of the kubeconfig cluster to use
--context string The name of the kubeconfig context to use
--gloglevel int Set the glog logging level
--insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure
-k, --insecure-skip-verify If true, the Argo Server's certificate will not be checked for validity. This will make your HTTPS connections insecure. Defaults to the ARGO_INSECURE_SKIP_VERIFY environment variable.
--instanceid string submit with a specific controller's instance id label. Default to the ARGO_INSTANCEID environment variable.
Expand Down
1 change: 1 addition & 0 deletions docs/cli/argo_cron_get.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ argo cron get CRON_WORKFLOW... [flags]
--client-key string Path to a client key file for TLS
--cluster string The name of the kubeconfig cluster to use
--context string The name of the kubeconfig context to use
--gloglevel int Set the glog logging level
--insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure
-k, --insecure-skip-verify If true, the Argo Server's certificate will not be checked for validity. This will make your HTTPS connections insecure. Defaults to the ARGO_INSECURE_SKIP_VERIFY environment variable.
--instanceid string submit with a specific controller's instance id label. Default to the ARGO_INSTANCEID environment variable.
Expand Down
1 change: 1 addition & 0 deletions docs/cli/argo_cron_lint.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ argo cron lint FILE... [flags]
--client-key string Path to a client key file for TLS
--cluster string The name of the kubeconfig cluster to use
--context string The name of the kubeconfig context to use
--gloglevel int Set the glog logging level
--insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure
-k, --insecure-skip-verify If true, the Argo Server's certificate will not be checked for validity. This will make your HTTPS connections insecure. Defaults to the ARGO_INSECURE_SKIP_VERIFY environment variable.
--instanceid string submit with a specific controller's instance id label. Default to the ARGO_INSTANCEID environment variable.
Expand Down
1 change: 1 addition & 0 deletions docs/cli/argo_cron_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ argo cron list [flags]
--client-key string Path to a client key file for TLS
--cluster string The name of the kubeconfig cluster to use
--context string The name of the kubeconfig context to use
--gloglevel int Set the glog logging level
--insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure
-k, --insecure-skip-verify If true, the Argo Server's certificate will not be checked for validity. This will make your HTTPS connections insecure. Defaults to the ARGO_INSECURE_SKIP_VERIFY environment variable.
--instanceid string submit with a specific controller's instance id label. Default to the ARGO_INSTANCEID environment variable.
Expand Down
1 change: 1 addition & 0 deletions docs/cli/argo_cron_resume.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ argo cron resume [CRON_WORKFLOW...] [flags]
--client-key string Path to a client key file for TLS
--cluster string The name of the kubeconfig cluster to use
--context string The name of the kubeconfig context to use
--gloglevel int Set the glog logging level
--insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure
-k, --insecure-skip-verify If true, the Argo Server's certificate will not be checked for validity. This will make your HTTPS connections insecure. Defaults to the ARGO_INSECURE_SKIP_VERIFY environment variable.
--instanceid string submit with a specific controller's instance id label. Default to the ARGO_INSTANCEID environment variable.
Expand Down
Loading

0 comments on commit fafc5a9

Please sign in to comment.