Add Inspektor Gadget live debugging - #1216
Conversation
674c893 to
e6e36af
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit e6e36af. Configure here.
| if run := m.runs[id]; run != nil && !run.view.State.Terminal() { | ||
| run.partialReason = reason | ||
| run.cancel() | ||
| } |
There was a problem hiding this comment.
Successful captures marked partial on teardown
High Severity
watchTarget keeps running after a result is published and can still call Partial during the multi-second unload window. reporterPartial accepts that while state is stopping, and finalize prefers partialReason over a completed result, so a successful snapshot or DNS capture can end as partial with a failure banner whenever the Pod exits or is replaced during cleanup.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit e6e36af. Configure here.
| setSelectedContainer(defaultContainer) | ||
| setRun(undefined) | ||
| setError(undefined) | ||
| }, [namespace, pod, defaultContainer]) |
There was a problem hiding this comment.
Mid-capture container default clears run
Medium Severity
The effect that syncs selectedContainer also depends on defaultContainer and clears run whenever that value changes. A container restart or readiness flap during an active DNS capture can change the preferred running container and wipe the in-flight run from the UI, leaving the server capture invisible and unstoppable from the panel.
Reviewed by Cursor Bugbot for commit e6e36af. Configure here.


Summary
Adds an opt-in Live Debug surface to Pod details for clusters that already run Inspektor Gadget. Operators can inspect current processes, sockets, and short bounded DNS activity without leaving Radar, while every capture remains tied to the acting user, cluster context, Pod incarnation, and container runtime identity.
What changed
Live Debug experience
Runtime and lifecycle
Security and API surface
Distribution and operator support
Testing
Notes and tradeoffs
Note
High Risk
Introduces privileged, node-scoped kernel instrumentation with per-user proxy RBAC and a new MCP tool; misconfiguration or lifecycle bugs could leak cross-user runs or leave captures running after context changes.
Overview
Adds Live Debug for clusters that already run Inspektor Gadget: Pod detail UI for process and socket snapshots plus bounded DNS capture, backed by a new
pkg/igdebugrun manager and an embedded IG v0.54.1 gRPC client (OCI gadgets pinned by digest; optional--ig-gadget-registrymirror prefix).Captures use the acting user’s Kubernetes config through the apiserver gadget proxy, pin Pod UID/node/runtime container ID, enrich peers/DNS from visible Services/Pods, and expose
/api/ig/*(status, snapshots, runs, SSE) plus MCPinspect_pod_runtime. Context switches cancel in-flight runs; exec/default-container selection is centralized viak8s.DefaultContainerName.Build/release: default
withoutebpftag across Makefile, CI, Docker, GoReleaser, Air, and desktop Wails builds. Docs,ig-demoscripts, and MCP catalog tests are updated accordingly.Reviewed by Cursor Bugbot for commit e6e36af. Bugbot is set up for automated code reviews on this repo. Configure here.