mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-11 06:02:18 +00:00
Allow /healthz check from localhost
This commit is contained in:
@@ -165,11 +165,13 @@ func (s *Server) handleHealthz(w http.ResponseWriter, req *http.Request) {
|
||||
|
||||
// Check that the hostname known by the master matches the hostname
|
||||
// the kubelet knows
|
||||
hostname := s.host.GetHostname()
|
||||
if masterHostname != hostname {
|
||||
s.error(w, errors.New("Kubelet hostname \""+hostname+"\" does not match the hostname expected by the master \""+masterHostname+"\""))
|
||||
return
|
||||
}
|
||||
/*
|
||||
hostname := s.host.GetHostname()
|
||||
if masterHostname != hostname {
|
||||
s.error(w, errors.New("Kubelet hostname \""+hostname+"\" does not match the hostname expected by the master \""+masterHostname+"\""))
|
||||
return
|
||||
}
|
||||
*/
|
||||
w.Write([]byte("ok"))
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user