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
5021dbc1
Commit
5021dbc1
authored
Jun 18, 2015
by
Brendan Burns
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #10046 from cjcullen/fwfix
Allow passing through an explicit PROXY_SSH_USER.
parents
798739f0
abf1e768
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
13 deletions
+14
-13
configure-vm.sh
cluster/gce/configure-vm.sh
+1
-1
gce.go
pkg/cloudprovider/gce/gce.go
+1
-7
kubelet.go
pkg/kubelet/kubelet.go
+12
-5
No files found.
cluster/gce/configure-vm.sh
View file @
5021dbc1
...
...
@@ -501,7 +501,7 @@ EOF
cat
<<
EOF
>>/etc/salt/minion.d/grains.conf
cloud_config: /etc/gce.conf
advertise_address: '
${
EXTERNAL_IP
}
'
proxy_ssh_user: '
${
INSTANCE_PREFIX
}
'
proxy_ssh_user: '
${
PROXY_SSH_USER
}
'
EOF
fi
}
...
...
pkg/cloudprovider/gce/gce.go
View file @
5021dbc1
...
...
@@ -22,7 +22,6 @@ import (
"io/ioutil"
"net"
"net/http"
"os"
"path"
"strconv"
"strings"
...
...
@@ -490,12 +489,7 @@ func (gce *GCECloud) AddSSHKeyToAllInstances(user string, keyData []byte) error
glog
.
Errorf
(
"Could not get project: %v"
,
err
)
return
false
,
nil
}
hostname
,
err
:=
os
.
Hostname
()
if
err
!=
nil
{
glog
.
Errorf
(
"Could not get hostname: %v"
,
err
)
return
false
,
nil
}
keyString
:=
fmt
.
Sprintf
(
"%s:%s %s@%s"
,
user
,
strings
.
TrimSpace
(
string
(
keyData
)),
user
,
hostname
)
keyString
:=
fmt
.
Sprintf
(
"%s:%s %s@%s"
,
user
,
strings
.
TrimSpace
(
string
(
keyData
)),
user
,
user
)
found
:=
false
for
_
,
item
:=
range
project
.
CommonInstanceMetadata
.
Items
{
if
item
.
Key
==
"sshKeys"
{
...
...
pkg/kubelet/kubelet.go
View file @
5021dbc1
...
...
@@ -1663,6 +1663,11 @@ func (kl *Kubelet) admitPods(allPods []*api.Pod, podSyncTypes map[types.UID]Sync
func
(
kl
*
Kubelet
)
syncLoop
(
updates
<-
chan
PodUpdate
,
handler
SyncHandler
)
{
glog
.
Info
(
"Starting kubelet main sync loop."
)
for
{
if
!
kl
.
containerRuntimeUp
()
{
time
.
Sleep
(
5
*
time
.
Second
)
glog
.
Infof
(
"Skipping pod synchronization, container runtime is not up."
)
continue
}
unsyncedPod
:=
false
podSyncTypes
:=
make
(
map
[
types
.
UID
]
SyncPodType
)
select
{
...
...
@@ -1923,11 +1928,7 @@ func (kl *Kubelet) setNodeStatus(node *api.Node) error {
}
// Check whether container runtime can be reported as up.
containerRuntimeUp
:=
func
()
bool
{
kl
.
runtimeMutex
.
Lock
()
defer
kl
.
runtimeMutex
.
Unlock
()
return
kl
.
lastTimestampRuntimeUp
.
Add
(
kl
.
runtimeUpThreshold
)
.
After
(
time
.
Now
())
}()
containerRuntimeUp
:=
kl
.
containerRuntimeUp
()
currentTime
:=
util
.
Now
()
var
newNodeReadyCondition
api
.
NodeCondition
...
...
@@ -1990,6 +1991,12 @@ func (kl *Kubelet) setNodeStatus(node *api.Node) error {
return
nil
}
func
(
kl
*
Kubelet
)
containerRuntimeUp
()
bool
{
kl
.
runtimeMutex
.
Lock
()
defer
kl
.
runtimeMutex
.
Unlock
()
return
kl
.
lastTimestampRuntimeUp
.
Add
(
kl
.
runtimeUpThreshold
)
.
After
(
time
.
Now
())
}
// tryUpdateNodeStatus tries to update node status to master. If ReconcileCBR0
// is set, this function will also confirm that cbr0 is configured correctly.
func
(
kl
*
Kubelet
)
tryUpdateNodeStatus
()
error
{
...
...
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