mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 10:53:34 +00:00
rebase: update kubernetes to latest
updating the kubernetes release to the latest in main go.mod Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
committed by
mergify[bot]
parent
63c4c05b35
commit
5a66991bb3
19
vendor/k8s.io/apiserver/pkg/server/httplog/httplog.go
generated
vendored
19
vendor/k8s.io/apiserver/pkg/server/httplog/httplog.go
generated
vendored
@ -31,6 +31,7 @@ import (
|
||||
"k8s.io/apiserver/pkg/endpoints/metrics"
|
||||
"k8s.io/apiserver/pkg/endpoints/request"
|
||||
"k8s.io/apiserver/pkg/endpoints/responsewriter"
|
||||
"k8s.io/apiserver/pkg/server/routine"
|
||||
"k8s.io/klog/v2"
|
||||
)
|
||||
|
||||
@ -125,10 +126,26 @@ func withLogging(handler http.Handler, stackTracePred StacktracePred, shouldLogR
|
||||
rl := newLoggedWithStartTime(req, w, startTime)
|
||||
rl.StacktraceWhen(stackTracePred)
|
||||
req = req.WithContext(context.WithValue(ctx, respLoggerContextKey, rl))
|
||||
defer rl.Log()
|
||||
|
||||
var logFunc func()
|
||||
logFunc = rl.Log
|
||||
defer func() {
|
||||
if logFunc != nil {
|
||||
logFunc()
|
||||
}
|
||||
}()
|
||||
|
||||
w = responsewriter.WrapForHTTP1Or2(rl)
|
||||
handler.ServeHTTP(w, req)
|
||||
|
||||
// We need to ensure that the request is logged after it is processed.
|
||||
// In case the request is executed in a separate goroutine created via
|
||||
// WithRoutine handler in the handler chain (i.e. above handler.ServeHTTP()
|
||||
// would return request is completely responsed), we want the logging to
|
||||
// happen in that goroutine too, so we append it to the task.
|
||||
if routine.AppendTask(ctx, &routine.Task{Func: rl.Log}) {
|
||||
logFunc = nil
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user