Closed
Description
Description
When defining custom views in views.yaml
, certain column names and label references cause the view to fail to load or behave unexpectedly.
Steps to Reproduce
- Define a custom view for
v1/nodes
inviews.yaml
with the following configuration:
views:
v1/nodes:
sortColumn: AGE:desc
columns:
- NAME
- STATUS
- ROLE
- OS:.metadata.labels.kubernetes.io/os
- TAINTS
- VERSION
- PODS
- CPU
- MEM
- %CPU|H # Causes view load failure
- %MEM|H # Causes view load failure
- CPU/A|H # Does not fail, but does not hide
- MEM/A|H # Does not fail, but does not hide
- AGE
- Start K9s and attempt to load the view.
Expected Behavior
- The view should load without errors.
- The columns marked with
|H
should be hidden. - Labels should be correctly parsed even if they contain dots.
Actual Behavior
- The presence of
%CPU
and%MEM
causes the view to fail with the error: - "Views load failed!"
- Removing these columns allows the view to load.
- Columns with
/
in the name (e.g.,CPU/A
) are not hidden as expected—they are added to the end of the view instead of being hidden. - Labels with dots (e.g.,
.metadata.labels.kubernetes.io/os
) do not work, even when enclosed in quotes ("kubernetes.io/os"
).
Additional Notes
%
in column names seems to be an unsupported character that breaks loading./
in column names is not breaking the view but is being ignored for the|H
(hide) directive.- Label paths containing dots are not being resolved properly, making it impossible to extract values from such labels.