Skip to content

Fix: Update debugger container name #1

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

Merged
merged 1 commit into from
Dec 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/k8s/k8s.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ func (c *KubernetesClient) IsDebuggerContainerRunning(podName, namespace string)

// 检查指定容器的状态
for _, container := range pod.Status.ContainerStatuses {
if container.Name == "debugger" {
if container.Name == "[pod-debugger]debugger" {
return container.State.Running != nil, nil
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/plugin/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func SpawnDebuggerPodOnSuperNode(client *k8s.KubernetesClient, helper *DebuggerP

fmt.Printf("spawning debugger pod in pod %s success\n", helper.PodName)

err = client.ExecCommand(helper.PodName, helper.Namespace, "debugger", helper.Command)
err = client.ExecCommand(helper.PodName, helper.Namespace, "[pod-debugger]debugger", helper.Command)
// 仅输出报错,依然根据 --rm 参数删除pod
if err != nil {
klog.Errorf("Error executing command: %v\n", err)
Expand Down