groundcover-com / murre

Murre is an on-demand, scaleable source of container resource metrics for K8s.
https://www.groundcover.com/blog/murre
Apache License 2.0
310 stars 18 forks source link

Maxlevin/sc 5314/remove unwanted output when using murre help #15

Closed maxlevinps closed 1 year ago

maxlevinps commented 1 year ago

What this PR does / why we need it: In pflag pkg, when user uses --help but there is no help flag defined the library returns pflag.ErrHelp error and exits.

Output before the change:

Usage of murre:
      --container string    filter by container
      --interval duration   seconds to wait between updates (default '5s') (default 5s)
      --kubeconfig string   (optional) absolute path to the kubeconfig file (default "/home/max/.kube/config")
      --namespace string    filter by namespace
      --pod string          filter by pod
      --sortby-cpu          sort by cpu
      --sortby-cpu-util     sort by cpu utilization
      --sortby-mem          sort by memory
      --sortby-mem-util     sort by memory utilization
pflag: help requested
exit status 2

Output after the change:

Usage: murre [options]
      --container string    filter by container
      --help                show help
      --interval duration   seconds to wait between updates (default '5s') (default 5s)
      --kubeconfig string   (optional) absolute path to the kubeconfig file (default "/home/max/.kube/config")
      --namespace string    filter by namespace
      --pod string          filter by pod
      --sortby-cpu          sort by cpu
      --sortby-cpu-util     sort by cpu utilization
      --sortby-mem          sort by memory
      --sortby-mem-util     sort by memory utilization

Which issue(s) this PR fixes:

Special notes for your reviewer:

shortcut-integration[bot] commented 1 year ago

This pull request has been linked to Shortcut Story #5314: remove unwanted output when using murre --help.