From 8114084b487d80435b68d2b035ab7d4fade969ff Mon Sep 17 00:00:00 2001 From: wrype <719147488@qq.com> Date: Tue, 8 Aug 2023 08:02:23 +0800 Subject: [PATCH] chore(plugin): opti log of exec and ssh command --- cmd/plugin/commands/exec/exec.go | 2 +- cmd/plugin/commands/ssh/ssh.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/plugin/commands/exec/exec.go b/cmd/plugin/commands/exec/exec.go index 98686e266..59c245c9a 100644 --- a/cmd/plugin/commands/exec/exec.go +++ b/cmd/plugin/commands/exec/exec.go @@ -62,7 +62,7 @@ func exec(flags *genericclioptions.ConfigFlags, podName string, deployment strin if err != nil { return err } - fmt.Printf("exec in %s\n", pod.Name) + fmt.Printf("exec in ns:%s pod:%s\n", pod.Namespace, pod.Name) args := []string{"exec"} if opts.TTY { args = append(args, "-t") diff --git a/cmd/plugin/commands/ssh/ssh.go b/cmd/plugin/commands/ssh/ssh.go index 409a9de31..f84d5c00f 100644 --- a/cmd/plugin/commands/ssh/ssh.go +++ b/cmd/plugin/commands/ssh/ssh.go @@ -52,7 +52,7 @@ func ssh(flags *genericclioptions.ConfigFlags, podName string, deployment string if err != nil { return err } - fmt.Printf("exec in %s\n", pod.Name) + fmt.Printf("exec in ns:%s pod:%s\n", pod.Namespace, pod.Name) args := []string{"exec", "-it", "-n", pod.Namespace, pod.Name} if len(container) > 0 { args = append(args, "-c", container)