steveteuber / kubectl-graph

A kubectl plugin to visualize Kubernetes resources and relationships.
Apache License 2.0
589 stars 29 forks source link

adjustable node size #53

Closed icanhazbeer closed 1 year ago

icanhazbeer commented 2 years ago

is there a way to adjust the node size to fit the full resource name? it seems that when using dot format the name is truncated by '...' and I do not see the option to override this?

steveteuber commented 2 years ago

Hey @icanhazbeer,

Thank you for opening this issue. You are right, the name is truncated after 10 characters and currently it isn't possible to override this. But when you use SVG as output format (dot -T svg ...) you will get the full resource as a tooltip.

Is that's enough for you? If not or you prefer big nodes in the graph, please let me know.

icanhazbeer commented 1 year ago

Hi @steveteuber Apologies for the late reply. I will try the tooltip but I would prefer to have some control over the size of the nodes. I have some resources that have longer names (and some shorter ones) and I think it is better to see the full name inside the node.

steveteuber commented 1 year ago

Hey @icanhazbeer,

Sorry for the really late reply. Now you can "truncate" the node name for example with --truncate 99. Please upgrade the plugin to the latest version:

$ kubectl krew upgrade graph
Updated the local copy of plugin index.
  Upgrades available for installed plugins:
    * graph v0.5.0 -> v0.6.0
Upgrading plugin: graph
Upgraded plugin: graph
steveteuber commented 1 year ago

Hi @icanhazbeer,

Could we close this issue or do you still miss something?

a-27m commented 1 year ago

Hi @steveteuber, thank you for the new --truncate param. I've just used it to make the graph nodes expand and hold the full resource names, just as requested, it seems.