diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 49c4a60663a0..e6fb63fcf086 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -21,6 +21,7 @@ Checklist: **Anything else we need to know?**: **Environment**: + - Argo version: ``` $ argo version @@ -31,16 +32,22 @@ $ kubectl version -o yaml ``` **Other debugging information (if applicable)**: + - workflow result: + ``` -argo get +argo --loglevel DEBUG get ``` + - executor logs: + ``` kubectl logs -c init kubectl logs -c wait ``` + - workflow-controller logs: + ``` kubectl logs -n argo $(kubectl get pods -l app=workflow-controller -n argo -o name) ``` diff --git a/cmd/argo/commands/root.go b/cmd/argo/commands/root.go index 8487a940af3b..f9f54d70d724 100644 --- a/cmd/argo/commands/root.go +++ b/cmd/argo/commands/root.go @@ -4,8 +4,10 @@ import ( "fmt" "github.com/argoproj/pkg/cli" + log "github.com/sirupsen/logrus" "github.com/spf13/cobra" + "github.com/argoproj/argo" "github.com/argoproj/argo/cmd/argo/commands/clustertemplate" "github.com/argoproj/argo/cmd/argo/commands/auth" @@ -62,10 +64,16 @@ If you're using the Argo Server (e.g. because you need large workflow support or // global log level var logLevel string + var verbose bool command.PersistentPreRun = func(cmd *cobra.Command, args []string) { + if verbose { + logLevel = "debug" + } cli.SetLogLevel(logLevel) + 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().BoolVarP(&verbose, "verbose", "v", false, "Enabled verbose logging, i.e. --loglevel debug") return command } diff --git a/pkg/apiclient/apiclient.go b/pkg/apiclient/apiclient.go index 6d657ba5bee8..4f5033bac533 100644 --- a/pkg/apiclient/apiclient.go +++ b/pkg/apiclient/apiclient.go @@ -3,6 +3,7 @@ package apiclient import ( "context" + log "github.com/sirupsen/logrus" "k8s.io/client-go/tools/clientcmd" clusterworkflowtmplpkg "github.com/argoproj/argo/pkg/apiclient/clusterworkflowtemplate" @@ -38,6 +39,7 @@ func NewClient(argoServer string, authSupplier func() string, clientConfig clien } func NewClientFromOpts(opts Opts) (context.Context, Client, error) { + log.WithField("opts", opts).Debug("Client options") if opts.ArgoServerOpts.URL != "" { return newArgoServerClient(opts.ArgoServerOpts, opts.AuthSupplier()) } else { diff --git a/test/e2e/manifests/mixins/argo-server-deployment.yaml b/test/e2e/manifests/mixins/argo-server-deployment.yaml index c831895f495a..f4ce656a9fd5 100644 --- a/test/e2e/manifests/mixins/argo-server-deployment.yaml +++ b/test/e2e/manifests/mixins/argo-server-deployment.yaml @@ -8,12 +8,11 @@ spec: containers: - name: argo-server args: + - -v - server - --namespaced - --auth-mode - client - - --loglevel - - debug - --secure imagePullPolicy: Never env: