Skip to content

Messages in stderr instead of stdout #13464

Description

@yurnov

I noticed that in a lot of cases, all output of the helm binary appeared in stderr instead of stdout, even something like Pulled: my-registry/helm/chart:1.1.0-1234\nDigest: sha256:a023f566d0fed443f7c745a5112c1a71c3ec9aab4127435d34256c2dc03d97cf\n or Login Succeeded

It not related to the version of the kubectl or Kubernetes, it's helm binary itself.

Step to reproduce:

~/tmp$ helm registry login localhost:5000 --username=username --password=password > stdout.log 2> stderr.log
~/tmp$ cat stdout.log
~/tmp$ cat stderr.log
WARNING: Using --password via the CLI is insecure. Use --password-stdin.
Login Succeeded
~/tmp$ helm version
version.BuildInfo{Version:"v3.16.3", GitCommit:"cfd07493f46efc9debd9cc1b02a0961186df7fdf", GitTreeState:"clean", GoVersion:"go1.22.7"}

Expected result:
message Login Succeeded in the stdout (when WARNING: Using --password via the CLI is insecure. Use --password-stdin. can be in stderr or stdout, it's doesn't matter)

Actual result:
message Login Succeeded in the stderr

It has the same result as any other helm command, just helm registry login is the easiest way to reproduce.

Output of helm version:

version.BuildInfo{Version:"v3.16.3", GitCommit:"cfd07493f46efc9debd9cc1b02a0961186df7fdf", GitTreeState:"clean", GoVersion:"go1.22.7"}

Output of kubectl version:

Not related

Cloud Provider/Platform (AKS, GKE, Minikube etc.):

Not related

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions