Skip to content
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 sshuser flag #335

Merged
merged 5 commits into from
Sep 11, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
update connect information output
  • Loading branch information
tedteng committed Sep 11, 2023
commit f01801b36d2430e7c1d330c8f55fbe7fa5a485f0
3 changes: 3 additions & 0 deletions pkg/cmd/ssh/connect_information.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ type ConnectInformation struct {

// Nodes is a list of Node objects containing information about the worker nodes.
Nodes []Node `json:"nodes"`

// User is the name of the Shoot cluster node ssh login username
User string
}
Expand Down Expand Up @@ -86,6 +87,7 @@ func NewConnectInformation(
sshPrivateKeyFile PrivateKeyFile,
nodePrivateKeyFiles []PrivateKeyFile,
nodes []corev1.Node,
user string,
) (*ConnectInformation, error) {
var nodeList []Node

Expand Down Expand Up @@ -142,6 +144,7 @@ func NewConnectInformation(
NodeHostname: nodeHostname,
NodePrivateKeyFiles: nodePrivateKeyFiles,
Nodes: nodeList,
User: user,
}, nil
}

Expand Down
1 change: 1 addition & 0 deletions pkg/cmd/ssh/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,7 @@ func (o *SSHOptions) Run(f util.Factory) error {
o.SSHPrivateKeyFile,
nodePrivateKeyFiles,
nodes,
o.User,
)
if err != nil {
return err
Expand Down