Open vallamost opened 2 years ago
Definitely second this. Great feature being able to customise columns. Without knowing which columns are available though, I can't use the full potential. Seems like a simple (obvious) add for a big win.
"AGE"
"CPU"
"CPU/R:L"
"IP"
"LABELS"
"MEM"
"MEM/R:L"
"NAME"
"NAMESPACE"
"NODE"
"NOMINATED NODE"
"PF"
"QOS"
"READINESS GATES"
"READY"
"RESTARTS"
"STATUS"
"VALID"
"%CPU/L"
"%CPU/R"
"%MEM/L"
"%MEM/R"
Some gotchas while editing views.yml
:
views.yml
will silently fail, and sometimes the live update won't update%
, it needs to be quoted like so, "%CPU/R"
for yaml to pick that up as a string@vallamost This is a bit of an impossible request as each k8s resource will have different set of columns, no to mention crds... Best is to view the resource first and go wide with ctrl-w
to see all available columns. Then decide which columns you would like to use and customize your views.yml accordingly. The config file is watched so you can add/delete/update at will. Also if you forgot a column name you can simply revert by insuring the resource name no longer matches in the views.yml.
As @hosh correctly points out, you will need to tail the k9s logs to ensure the yaml parses out as custom views errors are currently not surfaced in the ui ;( As for @hosh #2 this is a yaml thing values must be valid strings ie no quotes needed if the column name starts with a letter or needs to be quoted if not. Hope this helps...
I've similar issues trying to extract field values for columns containing % sign in plugin.yml... example, in pod view, how to extract the value of "%MEM/R"? tried:
with 0 success...
a basic plugin
get-resources:
shortCut: Shift-N
confirm: false
description: get resources
scopes:
- pods
command: sh
background: false
args:
- -c
- echo $NAME $NAMESPACE $COL-CPU $COL-MEM "$COL-%CPU/R" | less
# - echo $NAME $NAMESPACE $COL-CPU $COL-MEM $COL-%CPU/R $COL-%CPU/L $COL-%MEM/R $COL-%MEM/L | less
@fragolinux Thanks for the heads up! I think the shell chokes on those cols. Could you please open a new issue as this is a bug in the var naming convention. Tx!
@derailed done, thanks!
Actually @derailed, seeing all the available columns in wide mode would be an acceptable hint on the page! Also future-proof. Could we at least have that for the k9s newbies? 😄
Is your feature request related to a problem? Please describe.
The doc linked below shows that you can customize columns with K9s and after a bit of work to configure the XDG folder and env variable it does seem to work. However there are only a few columns in the example config. Can you please provide the full list of columns that can be customized either in the sample config or further down?
https://k9scli.io/topics/columns/
Describe the solution you'd like
Can you please provide the full list of column names that can be customized either in the sample config or further down on this page https://k9scli.io/topics/columns/?
Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
Additional context Add any other context or screenshots about the feature request here.