UPSTREAM: 48813: maxinflight handler should let panicrecovery handler call NewLogged
@@ -27,7 +27,6 @@ import (
"k8s.io/apiserver/pkg/endpoints/metrics"
apirequest "k8s.io/apiserver/pkg/endpoints/request"
genericapirequest "k8s.io/apiserver/pkg/endpoints/request"
- "k8s.io/apiserver/pkg/server/httplog"
"github.com/golang/glog"
)
@@ -128,10 +127,6 @@ func WithMaxInFlightLimit(
}
func tooManyRequests(req *http.Request, w http.ResponseWriter) {
- // "Too Many Requests" response is returned before logger is setup for the request.
- // So we need to explicitly log it here.
- defer httplog.NewLogged(req, &w).Log()
-
// Return a 429 status indicating "Too Many Requests"
w.Header().Set("Retry-After", retryAfter)
http.Error(w, "Too many requests, please try again later.", http.StatusTooManyRequests)
