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
d92daf69
Commit
d92daf69
authored
Aug 28, 2015
by
k8s-merge-robot
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #13329 from swagiaal/remove-hostname-health-check
Auto commit by PR queue bot
parents
89253638
ccd0fcd1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
20 deletions
+0
-20
server.go
pkg/kubelet/server.go
+0
-20
No files found.
pkg/kubelet/server.go
View file @
d92daf69
...
@@ -130,7 +130,6 @@ func (s *Server) InstallDefaultHandlers() {
...
@@ -130,7 +130,6 @@ func (s *Server) InstallDefaultHandlers() {
healthz
.
InstallHandler
(
s
.
restfulCont
,
healthz
.
InstallHandler
(
s
.
restfulCont
,
healthz
.
PingHealthz
,
healthz
.
PingHealthz
,
healthz
.
NamedCheck
(
"docker"
,
s
.
dockerHealthCheck
),
healthz
.
NamedCheck
(
"docker"
,
s
.
dockerHealthCheck
),
healthz
.
NamedCheck
(
"hostname"
,
s
.
hostnameHealthCheck
),
healthz
.
NamedCheck
(
"syncloop"
,
s
.
syncLoopHealthCheck
),
healthz
.
NamedCheck
(
"syncloop"
,
s
.
syncLoopHealthCheck
),
)
)
var
ws
*
restful
.
WebService
var
ws
*
restful
.
WebService
...
@@ -287,25 +286,6 @@ func (s *Server) dockerHealthCheck(req *http.Request) error {
...
@@ -287,25 +286,6 @@ func (s *Server) dockerHealthCheck(req *http.Request) error {
return
nil
return
nil
}
}
func
(
s
*
Server
)
hostnameHealthCheck
(
req
*
http
.
Request
)
error
{
masterHostname
,
_
,
err
:=
net
.
SplitHostPort
(
req
.
Host
)
if
err
!=
nil
{
if
!
strings
.
Contains
(
req
.
Host
,
":"
)
{
masterHostname
=
req
.
Host
}
else
{
return
fmt
.
Errorf
(
"Could not parse hostname from http request: %v"
,
err
)
}
}
// Check that the hostname known by the master matches the hostname
// the kubelet knows
hostname
:=
s
.
host
.
GetHostname
()
if
masterHostname
!=
hostname
&&
masterHostname
!=
"127.0.0.1"
&&
masterHostname
!=
"localhost"
{
return
fmt
.
Errorf
(
"Kubelet hostname
\"
%v
\"
does not match the hostname expected by the master
\"
%v
\"
"
,
hostname
,
masterHostname
)
}
return
nil
}
// Checks if kubelet's sync loop that updates containers is working.
// Checks if kubelet's sync loop that updates containers is working.
func
(
s
*
Server
)
syncLoopHealthCheck
(
req
*
http
.
Request
)
error
{
func
(
s
*
Server
)
syncLoopHealthCheck
(
req
*
http
.
Request
)
error
{
duration
:=
s
.
host
.
ResyncInterval
()
*
2
duration
:=
s
.
host
.
ResyncInterval
()
*
2
...
...
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