Merge pull request #117969 from daman1807/fix/proxy-health-check

Release read lock early in proxy service health check
This commit is contained in:
Kubernetes Prow Robot
2023-05-12 06:03:09 -07:00
committed by GitHub

View File

@@ -235,8 +235,8 @@ func (h hcHandler) ServeHTTP(resp http.ResponseWriter, req *http.Request) {
return
}
count := svc.endpoints
kubeProxyHealthy := h.hcs.healthzServer.IsHealthy()
h.hcs.lock.RUnlock()
kubeProxyHealthy := h.hcs.healthzServer.IsHealthy()
resp.Header().Set("Content-Type", "application/json")
resp.Header().Set("X-Content-Type-Options", "nosniff")