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
3ce7fe83
Commit
3ce7fe83
authored
Jun 12, 2015
by
Abhi Shah
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #9722 from mikedanese/host-ip-spam
Fix spammy GetHostIP error log in kubelet
parents
2e9509fb
5896ac9e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
13 deletions
+26
-13
server.go
cmd/kubelet/app/server.go
+4
-0
service.go
contrib/mesos/pkg/executor/service/service.go
+10
-8
kubelet.go
pkg/kubelet/kubelet.go
+12
-5
No files found.
cmd/kubelet/app/server.go
View file @
3ce7fe83
...
...
@@ -94,6 +94,7 @@ type KubeletServer struct {
OOMScoreAdj
int
APIServerList
util
.
StringList
RegisterNode
bool
StandaloneMode
bool
ClusterDomain
string
MasterServiceNamespace
string
ClusterDNS
util
.
IP
...
...
@@ -332,6 +333,7 @@ func (s *KubeletServer) Run(_ []string) error {
MaxPerPodContainerCount
:
s
.
MaxPerPodContainerCount
,
MaxContainerCount
:
s
.
MaxContainerCount
,
RegisterNode
:
s
.
RegisterNode
,
StandaloneMode
:
(
len
(
s
.
APIServerList
)
==
0
),
ClusterDomain
:
s
.
ClusterDomain
,
ClusterDNS
:
s
.
ClusterDNS
,
Runonce
:
s
.
RunOnce
,
...
...
@@ -662,6 +664,7 @@ type KubeletConfig struct {
MaxPerPodContainerCount
int
MaxContainerCount
int
RegisterNode
bool
StandaloneMode
bool
ClusterDomain
string
ClusterDNS
util
.
IP
EnableServer
bool
...
...
@@ -722,6 +725,7 @@ func createAndInitKubelet(kc *KubeletConfig) (k KubeletBootstrap, pc *config.Pod
gcPolicy
,
pc
.
SeenAllSources
,
kc
.
RegisterNode
,
kc
.
StandaloneMode
,
kc
.
ClusterDomain
,
net
.
IP
(
kc
.
ClusterDNS
),
kc
.
MasterServiceNamespace
,
...
...
contrib/mesos/pkg/executor/service/service.go
View file @
3ce7fe83
...
...
@@ -218,14 +218,15 @@ func (s *KubeletExecutorServer) Run(hks hyperkube.Interface, _ []string) error {
// ManifestURL: ""
// FileCheckFrequency
// HTTPCheckFrequency
PodInfraContainerImage
:
s
.
PodInfraContainerImage
,
SyncFrequency
:
s
.
SyncFrequency
,
RegistryPullQPS
:
s
.
RegistryPullQPS
,
RegistryBurst
:
s
.
RegistryBurst
,
MinimumGCAge
:
s
.
MinimumGCAge
,
MaxPerPodContainerCount
:
s
.
MaxPerPodContainerCount
,
MaxContainerCount
:
s
.
MaxContainerCount
,
RegisterNode
:
s
.
RegisterNode
,
PodInfraContainerImage
:
s
.
PodInfraContainerImage
,
SyncFrequency
:
s
.
SyncFrequency
,
RegistryPullQPS
:
s
.
RegistryPullQPS
,
RegistryBurst
:
s
.
RegistryBurst
,
MinimumGCAge
:
s
.
MinimumGCAge
,
MaxPerPodContainerCount
:
s
.
MaxPerPodContainerCount
,
MaxContainerCount
:
s
.
MaxContainerCount
,
RegisterNode
:
s
.
RegisterNode
,
// StandaloneMode: false
ClusterDomain
:
s
.
ClusterDomain
,
ClusterDNS
:
s
.
ClusterDNS
,
Runonce
:
s
.
RunOnce
,
...
...
@@ -327,6 +328,7 @@ func (ks *KubeletExecutorServer) createAndInitKubelet(
gcPolicy
,
pc
.
SeenAllSources
,
kc
.
RegisterNode
,
kc
.
StandaloneMode
,
kc
.
ClusterDomain
,
net
.
IP
(
kc
.
ClusterDNS
),
kc
.
MasterServiceNamespace
,
...
...
pkg/kubelet/kubelet.go
View file @
3ce7fe83
...
...
@@ -124,6 +124,7 @@ func NewMainKubelet(
containerGCPolicy
ContainerGCPolicy
,
sourcesReady
SourcesReadyFn
,
registerNode
bool
,
standaloneMode
bool
,
clusterDomain
string
,
clusterDNS
net
.
IP
,
masterServiceNamespace
string
,
...
...
@@ -232,6 +233,7 @@ func NewMainKubelet(
httpClient
:
&
http
.
Client
{},
sourcesReady
:
sourcesReady
,
registerNode
:
registerNode
,
standaloneMode
:
standaloneMode
,
clusterDomain
:
clusterDomain
,
clusterDNS
:
clusterDNS
,
serviceLister
:
serviceLister
,
...
...
@@ -387,6 +389,9 @@ type Kubelet struct {
// Set to true to have the node register itself with the apiserver.
registerNode
bool
// Set to true if the kubelet is in standalone mode (i.e. setup without an apiserver)
standaloneMode
bool
// If non-empty, use this for container DNS search.
clusterDomain
string
...
...
@@ -2126,11 +2131,13 @@ func (kl *Kubelet) generatePodStatus(pod *api.Pod) (api.PodStatus, error) {
podStatus
.
Conditions
=
append
(
podStatus
.
Conditions
,
getPodReadyCondition
(
spec
,
podStatus
.
ContainerStatuses
)
...
)
hostIP
,
err
:=
kl
.
GetHostIP
()
if
err
!=
nil
{
glog
.
Errorf
(
"Cannot get host IP: %v"
,
err
)
}
else
{
podStatus
.
HostIP
=
hostIP
.
String
()
if
!
kl
.
standaloneMode
{
hostIP
,
err
:=
kl
.
GetHostIP
()
if
err
!=
nil
{
glog
.
V
(
4
)
.
Infof
(
"Cannot get host IP: %v"
,
err
)
}
else
{
podStatus
.
HostIP
=
hostIP
.
String
()
}
}
return
*
podStatus
,
nil
...
...
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