k3s/cmd/kube-apiserver
Kubernetes Submit Queue a0f9412361
Merge pull request #62810 from liggitt/request-mapper
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Remove request context mapper

http.Request now allows setting/retrieving a per-request context, which removes the need for plumbing a request-context mapper throughout the stack

In addition to being way simpler, this has the benefit of removing a potentially contentious lock object from the handling path

This PR:
* removes RequestContextMapper
* converts context fetchers to use `req.Context()`
* converts context setters to use `req = req.WithContext(...)`
* updates filter plumbing in two places (audit and timeout) to properly return the request with modified context
* updates tests that used a fake context mapper to set the context in the request instead

Fixes https://github.com/kubernetes/kubernetes/issues/62796

```release-note
NONE
```
2018-04-23 13:01:14 -07:00
..
app Merge pull request #62810 from liggitt/request-mapper 2018-04-23 13:01:14 -07:00
BUILD Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
OWNERS add CaoShuFeng as a reviewer of kube-apiserver 2018-04-17 14:32:05 +08:00
apiserver.go low hanging fruit for using cobra commands 2018-01-17 13:43:43 -05:00