mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-11-02 06:47:34 +00:00
apiserver: plumb context with request deadline
- as soon as a request is received by the apiserver, determine the timeout of the request and set a new request context with the deadline. - the timeout filter that times out non-long-running requests should use the request context as opposed to a fixed 60s wait today. - admission and storage layer uses the same request context with the deadline specified. we use the default timeout enforced by the apiserver: - if the user has specified a timeout of 0s, this implies no timeout on the user's part. - if the user has specified a timeout that exceeds the maximum deadline allowed by the apiserver.
This commit is contained in:
@@ -134,7 +134,7 @@ func testWebhookTimeout(t *testing.T, watchCache bool) {
|
||||
{path: "/mutating/1/5s", timeoutSeconds: 3}, // from request
|
||||
},
|
||||
expectError: true,
|
||||
errorContains: "request did not complete within requested timeout",
|
||||
errorContains: "the server was unable to return a response in the time allotted",
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user