provide verbose output when health check fails

Kubernetes-commit: 3874e43550385c0f4adddc4ccbedf12478233692
This commit is contained in:
David Eads 2019-03-08 15:49:29 -05:00 committed by Kubernetes Publisher
parent b663bdd6e2
commit 121f70dcfd
1 changed files with 1 additions and 0 deletions

View File

@ -181,6 +181,7 @@ func handleRootHealthz(checks ...HealthzChecker) http.HandlerFunc {
}
// always be verbose on failure
if failed {
klog.V(2).Infof("%vhealthz check failed", verboseOut.String())
http.Error(w, fmt.Sprintf("%vhealthz check failed", verboseOut.String()), http.StatusInternalServerError)
return
}