ktop Release v0.7.4
ktop v0.7.4 refines the Workloads experience and introduces a shared floating Pod / Container / YAML Inspector modal, streamlining multi-page navigation and aligning table telemetry and colors across Overview and Workloads.
Workloads tables now display aggregated live CPU and MEM usage directly across Deployments, StatefulSets, and DaemonSets, workload detail subpages provide richer rollout metadata with full-object YAML inspection, and drilling into pods or container logs from Overview, Node Detail, or Workload Detail opens in a single transparent-margin modal frame that keeps the cluster header, tabs, parent edges, and footer visible around it.
Detailed Changes by Category
1. Shared Floating Pod / Container / YAML Inspector Modal (ui, views/overview, views/pod, views/container, application)
Transparent-Margin Overlay Frame & Single-Modal Leaf Inspection
- Problem / Context: Opening
Pod Detail,Container Logs, andContainer Specfrom Overview, Node Detail, and Workload Detail previously replaced the entire viewport across 4–5 stack levels, hiding parent context and allowing circularPod -> Node -> Podnavigation loops. - Technical Implementation: Added
ui.OverlayFrameinui/overlay.goto position floating modals within outer margins without clearing underlying cells, keeping the top Cluster Header,TabFrametabs and breadcrumbs, parent page edges, and bottom Context Footer visible. Hostedviews/pod.DetailPanel,views/container.DetailPanel, and inline YAML views inside a single modal-backed*tview.Pages(pod-inspector) inviews/overview/main_panel.go, tracked separately from the underlying page state inviews/overview/view_state.go. UpdatedApplication.NavigateToPodDetailandApplication.NavigateToContainerLogsinapplication/app_ctrl.goto delegate to the shared modal without pushing ontoNavigationStack, capping full-screen drill-down depth at 1 subpage (Node Detailor<Kind> Detail). - APIs / Signatures:
overlay := ui.NewOverlayFrame(inspectorPages, 4, 3, 3, 3) box, textView := ui.NewYAMLBox(ui.YAMLModalConfig{ Title: "Pod YAML: default/api-0", Content: yamlText, OnClose: onClose, })
- Behavioral Notes:
- Pressing
Enteron any pod row in Overview, Node Detail, or Workload Detail opens the floating Pod Inspector modal (vswitches inline to Pod YAML,Enteron a container switches inline to Container Logs,son Container Detail switches inline to Container Spec YAML). ESCunwinds cleanly inside the modal (YAML -> Container Logs -> Pod Detail -> Close Modal) and restores focus and footer context directly to the active parent table behind it (views/container/detail.go,views/node/detail.go,application/app_ctrl.go).- Added
Controller.GetPodfallback inviews/overview/main_panel.goand nil-safe metrics handling inmodel.NewPodModel(views/model/pod_model.go) so opening a pod from--page=workloadssucceeds even before Overview's pod cache populates.
- Pressing
2. Workloads Table Telemetry, Layout & Color Alignment (views/workloads, views/model, k8s, ui)
Live Aggregated CPU & MEM Columns and Compact Single-Line Summary
- Problem / Context: Workloads tables previously showed duplicate replica columns (
UP,AVAIL,DESIRED,CURRENT) alongside a request-onlyEFFcolumn that renderedn/awhenever pods omittedresources.requests, and used a two-row summary header duplicating the top-bar namespace display. - Technical Implementation: Added
model.WorkloadUsageandmodel.ComputePodsUsageinviews/model/workload_model.go(populated ink8s/workloads_controller.go) to sum live CPU and memory usage across each workload's active owned pods, withCPU(c) andMEM(e) sort support. Standardized Deployments, StatefulSets, and DaemonSets onto a unified 7-column layout (NS | NAME | READY | CPU | MEM | AGE | STATUS) withready/desiredratios inREADY, and collapsedviews/workloads/summary.gointo a single-lineSummarybar withoutNamespace. - Behavioral Notes: Aligned Workloads colors with Overview in
views/workloads/summary.go,views/workloads/page.go, andui/theme.go: Summary labels and separators useDataPrimary, liveCPUandMEMvalues useDataSecondaryon healthy rows,READYandAGEinheritrowColor, andScaled 0maps toStatusMutedso scaled-to-zero deployments recede visually as idle.
3. Redesigned Workload Detail Subpage & Full-Object YAML Modal (views/workloads, k8s, ui)
Kind-Specific Detail Subpages & Scrollable ui.YAMLModal
- Problem / Context: Workload detail subpages used a generic
Workload Detailheading, crowded replica counts into a single parenthetical string, devoted 4 vertical rows to request-ratio sparklines, and omitted key rollout fields (container images, revision, active ReplicaSet, strategy parameters, and full YAML). - Technical Implementation: Added
ui.YAMLModal,ui.FormatObjectYAML(marshaling typed Kubernetes objects withapiVersion/kindpreserved andmetadata.managedFieldsstripped), and sharedui.HighlightYAMLinui/yaml_modal.go(reused byviews/container/spec.go). Enrichedmodel.WorkloadDetailData(views/model/workload_model.go,k8s/workloads_controller.go) and redesignedviews/workloads/detail.go:- Kind-specific section headers (
Deployments > <name>,StatefulSets > <name>,DaemonSets > <name>,Jobs > <name>) and detail panel titles (Deployment Detail,StatefulSet Detail,DaemonSet Detail,Job Detail). - Single-line
Infobar with separate replica/job counters (Status,Desired,Ready,Updated,Available,Unavailable,PAUSED,Age). - Removed detail sparklines and unused
aggregatePodHistoryqueries, replacing them with liveused / req / limCPU and memory totals, rollout strategy details, revision and active ReplicaSet, container images, generation lag highlights, and unhealthy condition messages. - Made
<Kind> Detailactive on entry (TabcyclesDetail -> Owned Pods -> Events) so pressingEnteropens the full object YAML inui.YAMLModal(↑↓/j/k,PgUp/PgDn,g/G,ycopy,Esc/qclose). Replaced the redundantNAMESPACEcolumn in Owned Pods withNODE.
- Kind-specific section headers (
Upgrade & Compatibility Notes
- Backward Compatibility: Fully backward compatible with existing
ktopCLI flags,kubectl ktopplugin usage,--nouiJSON/JSONL output schemas, and~/.ktop/config.yamlconfigurations. - Deprecations & Retractions: Removed the circular
n(Pod -> Node) jump inside the Pod Inspector modal to keep modal navigation bounded. - Migration Actions: None required.
Workspace / Repository Metrics
27 files changed, 2113 insertions(+), 844 deletions(-)
- Documentation: