Skip to content

Commit

Permalink
message: use kubeconfig with tunneled
Browse files Browse the repository at this point in the history
  • Loading branch information
whomobile authored and wencaiwulue committed Nov 4, 2023
1 parent af9d909 commit 025e21a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pkg/handler/connect.go
Original file line number Diff line number Diff line change
Expand Up @@ -942,11 +942,18 @@ func SshJump(ctx context.Context, conf *util.SshConfig, flags *pflag.FlagSet, pr
return
}
if print {
log.Infof("using temp kubeconfig %s", temp.Name())
msg := fmt.Sprintf("| To use: export KUBECONFIG=%s |", temp.Name())
printLine(msg)
log.Infof(msg)
printLine(msg)
}
path = temp.Name()
return
}
func printLine(msg string) {
line := "+" + strings.Repeat("-", len(msg)-2) + "+"
log.Infof(line)
}

func SshJumpAndSetEnv(ctx context.Context, conf *util.SshConfig, flags *pflag.FlagSet, print bool) error {
if conf.Addr == "" && conf.ConfigAlias == "" {
Expand Down

0 comments on commit 025e21a

Please sign in to comment.