ktop icon indicating copy to clipboard operation
ktop copied to clipboard

Add option to shorten node names

Open TomKeur opened this issue 2 years ago • 0 comments

On some of the Kubernetes clusters I'm working the node names have really long names for example:

foo-01337-foobarinclongname-prd-controlplane.k8s.isp.tld

When I'm opening ktop I really need to make my Terminal window small to see: CPU and MEMORY columns in the Pods overview, because the of the long node names.

Maybe the simplest option is to add an flag --truncate nodenames, because I don't see a configuration file. But when adding such a flag I think it needs to be "smart", for example:

  • foo-01337-foobarinclongname-prd-controlplane1.k8s.isp.tld
  • foo-01337-foobarinclongname-prd-controlplane2.k8s.isp.tld
  • foo-01337-foobarinclongname-prd-controlplane3.k8s.isp.tld

When I'm seeing, 3 times: foo-01337-foobarinc it's not useful, but that can also be the other way around for example:

  • foo-01337-foobarinclongname-prd-controlplane.k8s.isp.tld
  • foo-01338-foobarinclongname-prd-controlplane.k8s.isp.tld
  • foo-01339-foobarinclongname-prd-controlplane.k8s.isp.tld

Displaying prd-controlplane.k8s.isp.tld is not useful as well.

Unfortunately I can't share a screenshot, but if you need more information let me know! Keep up the good work :).

TomKeur avatar Apr 18 '23 09:04 TomKeur