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

kubetest2 - Use --ssh-user to dump logs #10676

Merged
merged 1 commit into from
Jan 29, 2021
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
3 changes: 3 additions & 0 deletions tests/e2e/kubetest2-kops/deployer/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ func (d *deployer) initialize() error {
if d.SSHPublicKeyPath == "" {
d.SSHPublicKeyPath = os.Getenv("AWS_SSH_PUBLIC_KEY_FILE")
}
if d.SSHUser == "" {
d.SSHUser = os.Getenv("KUBE_SSH_USER")
}
return nil
}

Expand Down
6 changes: 3 additions & 3 deletions tests/e2e/kubetest2-kops/deployer/deployer.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ type deployer struct {

KubernetesVersion string `flag:"kubernetes-version" desc:"The kubernetes version to use in the cluster"`

SSHPrivateKeyPath string `flag:"ssh-private-key" desc:"The path to the private key used for SSH access to instances"`
SSHPublicKeyPath string `flag:"ssh-public-key" desc:"The path to the public key passed to the cloud provider"`
SSHUser []string `flag:"ssh-user" desc:"The SSH users to use for SSH access to instances"`
SSHPrivateKeyPath string `flag:"ssh-private-key" desc:"The path to the private key used for SSH access to instances"`
SSHPublicKeyPath string `flag:"ssh-public-key" desc:"The path to the public key passed to the cloud provider"`
SSHUser string `flag:"ssh-user" desc:"The SSH user to use for SSH access to instances"`

ArtifactsDir string `flag:"-"`

Expand Down
1 change: 1 addition & 0 deletions tests/e2e/kubetest2-kops/deployer/dumplogs.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ func (d *deployer) DumpClusterLogs() error {
"--name", d.ClusterName,
"--dir", d.ArtifactsDir,
"--private-key", d.SSHPrivateKeyPath,
"--ssh-user", d.SSHUser,
}
klog.Info(strings.Join(args, " "))
cmd := exec.Command(args[0], args[1:]...)
Expand Down