chore(plugin): opti log of exec and ssh command

This commit is contained in:
wrype 2023-08-08 08:02:23 +08:00
parent 7385a371f6
commit 8114084b48
2 changed files with 2 additions and 2 deletions

View file

@ -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")

View file

@ -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)