From 6e3fd91e1aa3259d7bd67e0a65693e346ade347d Mon Sep 17 00:00:00 2001 From: "Dr. Stefan Schimanski" Date: Fri, 14 Jun 2019 11:37:48 +0200 Subject: [PATCH] apiserver: don't log stack trace on /healthz error --- staging/src/k8s.io/apiserver/pkg/server/healthz/healthz.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/staging/src/k8s.io/apiserver/pkg/server/healthz/healthz.go b/staging/src/k8s.io/apiserver/pkg/server/healthz/healthz.go index 81d2bccb4ed..60e782f624a 100644 --- a/staging/src/k8s.io/apiserver/pkg/server/healthz/healthz.go +++ b/staging/src/k8s.io/apiserver/pkg/server/healthz/healthz.go @@ -25,10 +25,10 @@ import ( "sync/atomic" "time" - "k8s.io/klog" - "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/apiserver/pkg/server/httplog" + "k8s.io/klog" ) // HealthzChecker is a named healthz checker. @@ -181,7 +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) + http.Error(httplog.Unlogged(w), fmt.Sprintf("%vhealthz check failed", verboseOut.String()), http.StatusInternalServerError) return }