Skip to content

feat(ui): per-kind table columns for non-pod resources - #18

Merged
ErfanY merged 2 commits into
mainfrom
feat/non-pod-columns
Jun 25, 2026
Merged

feat(ui): per-kind table columns for non-pod resources#18
ErfanY merged 2 commits into
mainfrom
feat/non-pod-columns

Conversation

@ErfanY

@ErfanY ErfanY commented Jun 25, 2026

Copy link
Copy Markdown
Owner

Summary

Non-pod views previously collapsed every resource to a single loose Summary string (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.

Kind Extra columns
Deployments UP-TO-DATE AVAILABLE
ReplicaSets DESIRED CURRENT READY
StatefulSets READY
DaemonSets DESIRED READY AVAIL
Services TYPE CLUSTER-IP PORTS
Ingresses CLASS HOSTS ADDRESS
Jobs COMPLETIONS DURATION
CronJobs SCHEDULE SUSPEND ACTIVE
ConfigMaps / Secrets DATA / TYPE DATA
ServiceAccounts SECRETS
Nodes ROLES VERSION
PVCs / PVs VOLUME CAPACITY ACCESS STORAGECLASS / + RECLAIM CLAIM
HPAs REFERENCE MINPODS MAXPODS REPLICAS
PDBs MIN-AVAIL MAX-UNAVAIL ALLOWED

Kinds without distinctive columns render just the four universal ones.

── Services ──
│default   my-resource-name   [OK] -      0s   LoadBalancer  10.0.0.5   80/TCP,443/TCP │
── PVCs ──
│default   my-resource-name   [OK] Bound  0s   pv-001        10Gi  RWO  gp3            │

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).
  • A contract test asserts the header count and emitted value count stay in lockstep for all 24 kinds.

Model change

summary: Stringcolumns: Vec<String>. Pods now carry an empty vec, which drops the previously-unused per-pod node= string on the 10k-pod hot path (small net memory win). Filtering and :dump/copy span all columns.

Testing

  • make validate green locally (94 tests + release build)
  • new tests: column contract (all kinds), deployment/service/pvc extraction, non-pod render snapshot

🤖 Generated with Claude Code

ErfanY and others added 2 commits June 25, 2026 10:54
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>
@ErfanY
ErfanY merged commit 8cbe27e into main Jun 25, 2026
1 check passed
@ErfanY
ErfanY deleted the feat/non-pod-columns branch June 25, 2026 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant