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
30a5efa3
Commit
30a5efa3
authored
Dec 20, 2016
by
Jeff Grafton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add flag to node e2e test specifying location of ssh privkey
parent
1955ed61
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
1 deletion
+13
-1
exceptions.txt
hack/verify-flags/exceptions.txt
+1
-0
known-flags.txt
hack/verify-flags/known-flags.txt
+1
-0
ssh.go
test/e2e_node/remote/ssh.go
+11
-1
No files found.
hack/verify-flags/exceptions.txt
View file @
30a5efa3
...
@@ -36,6 +36,7 @@ cluster/photon-controller/templates/salt-minion.sh: hostname_override: $(ip rou
...
@@ -36,6 +36,7 @@ cluster/photon-controller/templates/salt-minion.sh: hostname_override: $(ip rou
cluster/photon-controller/util.sh: node_ip=$(${PHOTON} vm networks "${node_id}" | grep -i $'\t'"00:0C:29" | grep -E '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+' | head -1 | awk -F'\t' '{print $3}')
cluster/photon-controller/util.sh: node_ip=$(${PHOTON} vm networks "${node_id}" | grep -i $'\t'"00:0C:29" | grep -E '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+' | head -1 | awk -F'\t' '{print $3}')
cluster/photon-controller/util.sh: local cert_dir="/srv/kubernetes"
cluster/photon-controller/util.sh: local cert_dir="/srv/kubernetes"
cluster/photon-controller/util.sh: node_name=${1}
cluster/photon-controller/util.sh: node_name=${1}
cluster/photon-controller/util.sh: ssh_key=$(ssh-add -L | head -1)
cluster/rackspace/util.sh: local node_ip=$(nova show --minimal ${NODE_NAMES[$i]} \
cluster/rackspace/util.sh: local node_ip=$(nova show --minimal ${NODE_NAMES[$i]} \
cluster/saltbase/salt/cluster-autoscaler/cluster-autoscaler.manifest:{% set params = pillar['autoscaler_mig_config'] + " " + cloud_config -%}
cluster/saltbase/salt/cluster-autoscaler/cluster-autoscaler.manifest:{% set params = pillar['autoscaler_mig_config'] + " " + cloud_config -%}
cluster/saltbase/salt/etcd/etcd.manifest: "value": "{{ storage_backend }}"
cluster/saltbase/salt/etcd/etcd.manifest: "value": "{{ storage_backend }}"
...
...
hack/verify-flags/known-flags.txt
View file @
30a5efa3
...
@@ -573,6 +573,7 @@ sort-by
...
@@ -573,6 +573,7 @@ sort-by
source-file
source-file
ssh-env
ssh-env
ssh-keyfile
ssh-keyfile
ssh-key
ssh-options
ssh-options
ssh-user
ssh-user
start-services
start-services
...
...
test/e2e_node/remote/ssh.go
View file @
30a5efa3
...
@@ -29,9 +29,11 @@ import (
...
@@ -29,9 +29,11 @@ import (
var
sshOptions
=
flag
.
String
(
"ssh-options"
,
""
,
"Commandline options passed to ssh."
)
var
sshOptions
=
flag
.
String
(
"ssh-options"
,
""
,
"Commandline options passed to ssh."
)
var
sshEnv
=
flag
.
String
(
"ssh-env"
,
""
,
"Use predefined ssh options for environment. Options: gce"
)
var
sshEnv
=
flag
.
String
(
"ssh-env"
,
""
,
"Use predefined ssh options for environment. Options: gce"
)
var
sshKey
=
flag
.
String
(
"ssh-key"
,
""
,
"Path to ssh private key."
)
var
sshUser
=
flag
.
String
(
"ssh-user"
,
""
,
"Use predefined user for ssh."
)
var
sshUser
=
flag
.
String
(
"ssh-user"
,
""
,
"Use predefined user for ssh."
)
var
sshOptionsMap
map
[
string
]
string
var
sshOptionsMap
map
[
string
]
string
var
sshDefaultKeyMap
map
[
string
]
string
func
init
()
{
func
init
()
{
usr
,
err
:=
user
.
Current
()
usr
,
err
:=
user
.
Current
()
...
@@ -39,7 +41,10 @@ func init() {
...
@@ -39,7 +41,10 @@ func init() {
glog
.
Fatal
(
err
)
glog
.
Fatal
(
err
)
}
}
sshOptionsMap
=
map
[
string
]
string
{
sshOptionsMap
=
map
[
string
]
string
{
"gce"
:
fmt
.
Sprintf
(
"-i %s/.ssh/google_compute_engine -o UserKnownHostsFile=/dev/null -o IdentitiesOnly=yes -o CheckHostIP=no -o StrictHostKeyChecking=no -o ServerAliveInterval=30 -o LogLevel=ERROR"
,
usr
.
HomeDir
),
"gce"
:
"-o UserKnownHostsFile=/dev/null -o IdentitiesOnly=yes -o CheckHostIP=no -o StrictHostKeyChecking=no -o ServerAliveInterval=30 -o LogLevel=ERROR"
,
}
sshDefaultKeyMap
=
map
[
string
]
string
{
"gce"
:
fmt
.
Sprintf
(
"%s/.ssh/google_compute_engine"
,
usr
.
HomeDir
),
}
}
}
}
...
@@ -87,6 +92,11 @@ func SSHNoSudo(host string, cmd ...string) (string, error) {
...
@@ -87,6 +92,11 @@ func SSHNoSudo(host string, cmd ...string) (string, error) {
// runSSHCommand executes the ssh or scp command, adding the flag provided --ssh-options
// runSSHCommand executes the ssh or scp command, adding the flag provided --ssh-options
func
runSSHCommand
(
cmd
string
,
args
...
string
)
(
string
,
error
)
{
func
runSSHCommand
(
cmd
string
,
args
...
string
)
(
string
,
error
)
{
if
*
sshKey
!=
""
{
args
=
append
([]
string
{
"-i"
,
*
sshKey
},
args
...
)
}
else
if
key
,
found
:=
sshDefaultKeyMap
[
*
sshEnv
];
found
{
args
=
append
([]
string
{
"-i"
,
key
},
args
...
)
}
if
env
,
found
:=
sshOptionsMap
[
*
sshEnv
];
found
{
if
env
,
found
:=
sshOptionsMap
[
*
sshEnv
];
found
{
args
=
append
(
strings
.
Split
(
env
,
" "
),
args
...
)
args
=
append
(
strings
.
Split
(
env
,
" "
),
args
...
)
}
}
...
...
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