-
Notifications
You must be signed in to change notification settings - Fork 479
Add attach-based node debugger workflow that mirrors kubectl debug node #4168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add attach-based node debugger workflow that mirrors kubectl debug node #4168
Conversation
f094d39 to
a27ffc2
Compare
|
@skoeva , can you test this PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the node debugging feature to align with kubectl debug node behavior. It transitions from a privileged shell-based approach using alpine to an attach-based debugger workflow using busybox, changes the default namespace from kube-system to default, and implements graceful session cleanup.
Key changes:
- Replaces exec-based shell launching with attach-based debugging workflow
- Changes default image from alpine to busybox and default namespace from kube-system to default
- Implements exit command-based cleanup instead of explicit pod deletion
- Updates UI labels from "Node Shell" to "Debug Node"
Reviewed Changes
Copilot reviewed 29 out of 29 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| frontend/src/components/node/NodeShellTerminal.tsx | Core workflow refactoring: pod spec now mirrors kubectl debug node with host mounts, tolerations, stdin/tty flags, and attach URL; adds exit-based cleanup handlers |
| frontend/src/components/node/NodeShellAction.tsx | Updates UI label to "Debug Node" and changes icon to mdi:bug |
| frontend/src/helpers/clusterSettings.ts | Changes default image to busybox:latest and default namespace to 'default' |
| frontend/src/components/App/Settings/NodeShellSettings.tsx | Updates settings UI to reflect new namespace default |
| frontend/src/i18n/locales/*/glossary.json | Updates translations for "Node Shell" → "Debug Node" and error messages |
| frontend/src/i18n/locales/*/translation.json | Updates namespace default description across all locales |
| frontend/src/components/App/Settings/snapshots/NodeShellSettings.Default.stories.storyshot | Updates snapshot to reflect new defaults |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
27c0491 to
4e42520
Compare
|
@farodin91 , do you have any comments? I thought of asking you since you have contributed the node-shell changes. |
Signed-off-by: Dor Serero <dor.serero@gmail.com>
Signed-off-by: Dor Serero <dor.serero@gmail.com>
4e42520 to
9f4ec16
Compare
|
I have read more about the differences in debug vs the approach we had. I like how tit makes it closer to the kubectl debug. /approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dorser, joaquimrocha The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Summary
This PR implements #4167. This work aligns node debugger workflow with
kubectl debug node. It provisions a busybox debugger container, attaches without running shell commands, and gracefully terminates the session on close (This also fixes the behavior when the window closes abruptly).Related Issue
Implements #4167
Changes
frontend/src/components/node/NodeShellAction.tsxto rename the entry point to “Debug Node” and use a debugger icon.frontend/src/helpers/clusterSettings.tsto default the node debugger image to busybox and run it in thedefaultnamespace.frontend/src/components/node/NodeShellTerminal.tsxso the generated pod mirrorskubectl debug node(host mounts, tolerations, stdin/tty flags, attach URL) and so the session is cleaned up by sendingexiton close/beforeunload/unmount.Steps to Test
node-debugger-*pod appears in the configured namespace, that the terminal attaches without launching a new shell command, and that closing the dialog/tab finishes the pod after anexitis sent.