Node ROLES: configurable role-label sources for non-Kubernetes label schemes #577
Closed
jonathanwiemers
started this conversation in
Ideas
Replies: 1 comment
|
This fits sofka. Agreed scope for a PR:
One correction to the workaround: Please show only custom sources in the example and use |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
First off — thanks for sofka. It has replaced k9s in my daily work, and the
config model (views, thresholds, per-context overrides) is a big part of why.
Problem
ROLESon the nodes table is built from two hardcoded label sources(
columns.rs::node_roles): thenode-role.kubernetes.io/<role>key prefix andthe legacy
kubernetes.io/rolevalue. Anything else renders<none>.Clusters whose provisioning labels nodes under their own domain hit this in both
shapes that exist in the wild:
node-role.example.com/<role>: ""example.com/role: <role>On those clusters the nodes table loses the column that tells control plane from
workers at a glance, while the labels are right there on the object.
Proposal
An opt-in config section that adds label sources. The Kubernetes-standard pair
stays active with no configuration.
the Kubernetes entries explicitly (as above) is a no-op
Display only — no effect on scheduling, filtering, sorting semantics, or any API
call. With no
[node_roles]section the cell renders exactly as it does today.Why
[views]doesn't cover thisThe obvious workaround is a custom column, and for the value shape it does work
— as a separate column next to
ROLES:The key shape has no equivalent. A JSON Pointer selects one known key, but
node-role.example.com/<role>puts the role in the key and uses one label perrole, so there is no fixed path to point at — and no way to fan several of them
into one cell. Even where a custom column does work, it sits beside a
ROLEScolumn still showing
<none>, which is worse than either alone.So this isn't a gap in
[views]— it's that role labels are a merge of severaldynamic keys, which is exactly what
node_rolesalready does for theKubernetes-standard labels. The ask is to let that same merge see one more
domain. (#523 asked for custom columns in general, which
[views]alreadycovers; this is the narrower case that survives it.)
Happy to work up a PR if you think this fits.
All reactions