feat(ui): per-kind table columns for non-pod resources - #18
Merged
Conversation
Non-pod views collapsed every resource to a single loose "Summary" string (label count / service type / "-"). Replace it with meaningful, fixed-width, kubectl-style columns per kind, rendered after the universal Namespace/Name/Status/Age: - deploy UP-TO-DATE/AVAILABLE, rs DESIRED/CURRENT/READY, sts READY, ds DESIRED/READY/AVAIL - svc TYPE/CLUSTER-IP/PORTS, ing CLASS/HOSTS/ADDRESS - job COMPLETIONS/DURATION, cronjob SCHEDULE/SUSPEND/ACTIVE - cm DATA, secret TYPE/DATA, sa SECRETS - node ROLES/VERSION - pvc VOLUME/CAPACITY/ACCESS/STORAGECLASS, pv adds RECLAIM/CLAIM - hpa REFERENCE/MINPODS/MAXPODS/REPLICAS, pdb MIN-AVAIL/MAX-UNAVAIL/ALLOWED ResourceKind::extra_columns() is the single source of truth for header labels and widths; extract_columns() in the provider emits the matching row values. A contract test asserts the two stay in lockstep for all 24 kinds. Entity model: summary: String -> columns: Vec<String>. Pods now carry an empty vec, dropping the previously-unused per-pod "node=" string on the 10k-pod hot path. Filtering and :dump/copy span all columns; kinds without distinctive columns render just the four universal ones. Tests: contract count check, deployment/service/pvc extraction, non-pod render snapshot (kind headers replace generic Summary). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ServiceAccounts showed only a SECRETS count (often 0 on k8s ≥1.24); RoleBindings/ClusterRoleBindings had no kind-specific columns at all (empty fallback). Add meaningful columns: - ServiceAccounts: SECRETS, PULL-SECRETS (imagePullSecrets count) - RoleBindings / ClusterRoleBindings: ROLE (roleRef kind/name, e.g. ClusterRole/view) and SUBJECTS (abbreviated kind:name list, e.g. sa:build,u:alice) Test: rolebinding role/subjects extraction; the all-kinds column-count contract test covers the new headers. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Non-pod views previously collapsed every resource to a single loose
Summarystring (label count, service type, or-). This replaces it with meaningful, fixed-width,kubectl get-style columns per kind, rendered after the universal Namespace · Name · Status · Age.UP-TO-DATEAVAILABLEDESIREDCURRENTREADYREADYDESIREDREADYAVAILTYPECLUSTER-IPPORTSCLASSHOSTSADDRESSCOMPLETIONSDURATIONSCHEDULESUSPENDACTIVEDATA/TYPEDATASECRETSROLESVERSIONVOLUME CAPACITY ACCESS STORAGECLASS/+ RECLAIM CLAIMREFERENCEMINPODSMAXPODSREPLICASMIN-AVAILMAX-UNAVAILALLOWEDKinds without distinctive columns render just the four universal ones.
Design
ResourceKind::extra_columns()is the single source of truth for header labels + widths.extract_columns()in the cluster provider emits the matching row values, in the same order, at ingest (full JSON is still dropped after extraction — lean-entity model preserved).Model change
summary: String→columns: Vec<String>. Pods now carry an empty vec, which drops the previously-unused per-podnode=string on the 10k-pod hot path (small net memory win). Filtering and:dump/copy span all columns.Testing
make validategreen locally (94 tests + release build)🤖 Generated with Claude Code