Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
975c5536
Commit
975c5536
authored
Jan 23, 2017
by
Jeff Vance
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ssh support for local
parent
90b5d4cb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
4 deletions
+13
-4
util.go
test/e2e/framework/util.go
+13
-4
No files found.
test/e2e/framework/util.go
View file @
975c5536
...
@@ -376,10 +376,10 @@ func SkipIfMissingResource(clientPool dynamic.ClientPool, gvr schema.GroupVersio
...
@@ -376,10 +376,10 @@ func SkipIfMissingResource(clientPool dynamic.ClientPool, gvr schema.GroupVersio
}
}
// ProvidersWithSSH are those providers where each node is accessible with SSH
// ProvidersWithSSH are those providers where each node is accessible with SSH
var
ProvidersWithSSH
=
[]
string
{
"gce"
,
"gke"
,
"aws"
}
var
ProvidersWithSSH
=
[]
string
{
"gce"
,
"gke"
,
"aws"
,
"local"
}
// providersWithMasterSSH are those providers where master node is accessible with SSH
// providersWithMasterSSH are those providers where master node is accessible with SSH
var
providersWithMasterSSH
=
[]
string
{
"gce"
,
"gke"
,
"kubemark"
,
"aws"
}
var
providersWithMasterSSH
=
[]
string
{
"gce"
,
"gke"
,
"kubemark"
,
"aws"
,
"local"
}
type
podCondition
func
(
pod
*
v1
.
Pod
)
(
bool
,
error
)
type
podCondition
func
(
pod
*
v1
.
Pod
)
(
bool
,
error
)
...
@@ -3872,6 +3872,7 @@ func GetSigner(provider string) (ssh.Signer, error) {
...
@@ -3872,6 +3872,7 @@ func GetSigner(provider string) (ssh.Signer, error) {
// please also add them to any SSH tests that are disabled because of signer
// please also add them to any SSH tests that are disabled because of signer
// support.
// support.
keyfile
:=
""
keyfile
:=
""
key
:=
""
switch
provider
{
switch
provider
{
case
"gce"
,
"gke"
,
"kubemark"
:
case
"gce"
,
"gke"
,
"kubemark"
:
keyfile
=
"google_compute_engine"
keyfile
=
"google_compute_engine"
...
@@ -3884,15 +3885,23 @@ func GetSigner(provider string) (ssh.Signer, error) {
...
@@ -3884,15 +3885,23 @@ func GetSigner(provider string) (ssh.Signer, error) {
// Otherwise revert to home dir
// Otherwise revert to home dir
keyfile
=
"kube_aws_rsa"
keyfile
=
"kube_aws_rsa"
case
"vagrant"
:
case
"vagrant"
:
keyfile
:
=
os
.
Getenv
(
"VAGRANT_SSH_KEY"
)
keyfile
=
os
.
Getenv
(
"VAGRANT_SSH_KEY"
)
if
len
(
keyfile
)
!=
0
{
if
len
(
keyfile
)
!=
0
{
return
sshutil
.
MakePrivateKeySignerFromFile
(
keyfile
)
return
sshutil
.
MakePrivateKeySignerFromFile
(
keyfile
)
}
}
return
nil
,
fmt
.
Errorf
(
"VAGRANT_SSH_KEY env variable should be provided"
)
return
nil
,
fmt
.
Errorf
(
"VAGRANT_SSH_KEY env variable should be provided"
)
case
"local"
:
keyfile
=
os
.
Getenv
(
"LOCAL_SSH_KEY"
)
// maybe?
if
len
(
keyfile
)
==
0
{
keyfile
=
"id_rsa"
}
default
:
default
:
return
nil
,
fmt
.
Errorf
(
"GetSigner(...) not implemented for %s"
,
provider
)
return
nil
,
fmt
.
Errorf
(
"GetSigner(...) not implemented for %s"
,
provider
)
}
}
key
:=
filepath
.
Join
(
keydir
,
keyfile
)
if
len
(
key
)
==
0
{
key
=
filepath
.
Join
(
keydir
,
keyfile
)
}
return
sshutil
.
MakePrivateKeySignerFromFile
(
key
)
return
sshutil
.
MakePrivateKeySignerFromFile
(
key
)
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment