-
Notifications
You must be signed in to change notification settings - Fork 39.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add --request-timeout to kube-apiserver to make global request timeout configurable #51415
Add --request-timeout to kube-apiserver to make global request timeout configurable #51415
Conversation
Hi @jpbetz. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
/assign mml |
// If specified, requests will be allocated a random timeout between this value, and twice this value. | ||
// Note that it is up to the request handlers to ignore or honor this timeout. In seconds. | ||
// If specified, all requests except those which match the LongRunningFunc predicate will timeout | ||
// after this duration. In seconds. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need In seconds
for type time.Duration?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! No, we don't. I'll remove.
/lgtm Thanks! |
@@ -132,6 +136,11 @@ func (s *ServerRunOptions) AddUniversalFlags(fs *pflag.FlagSet) { | |||
"The maximum number of mutating requests in flight at a given time. When the server exceeds this, "+ | |||
"it rejects requests. Zero for no limit.") | |||
|
|||
fs.DurationVar(&s.RequestTimeout, "request-timeout", s.RequestTimeout, ""+ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
validate it as non-negative.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I've added the validation check.
I'm fine with it. @sttts any reservations? |
…ds to be configured.
/retest |
@jpbetz: you can't request testing unless you are a kubernetes member. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/ok-to-test |
/lgtm |
/retest |
3 similar comments
/retest |
/retest |
/retest |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jpbetz, mml, wojtek-t Associated issue: 51355 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
Automatic merge from submit-queue (batch tested with PRs 50932, 49610, 51312, 51415, 50705) |
…-upstream-release-1.6 Automatic merge from submit-queue Automated cherry pick of #51415 upstream release 1.6 Cherrypick of #51415 **What this PR does / why we need it**: Backporting to support Kubernetes users with slower internet connections that need the ability to increase this timeout. **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # **Special notes for your reviewer**: **Release note**: ```release-note ```
Commit found in the "release-1.6" branch appears to be this PR. Removing the "cherrypick-candidate" label. If this is an error find help to get your PR picked. |
Created PR #52385 to merge this into 1.7. |
…-upstream-release-1.7 Automatic merge from submit-queue Automated cherry pick of #51415 upstream release 1.7 Cherrypick of #51415 Manually resolved merge conflicts for this one. **What this PR does / why we need it**: Backporting to support Kubernetes users with slower internet connections that need the ability to increase this timeout.
Commit found in the "release-1.7" branch appears to be this PR. Removing the "cherrypick-candidate" label. If this is an error find help to get your PR picked. |
What this PR does / why we need it:
Make the currently hard coded 60 global request timeout in apiserver configurable via a --request-timeout command line flag.
This has impacted k8s users on slower internet connections, making clusters resources inaccessible once the data volume for requests exceeds what can be transmitted in 60 seconds (the current hard coded limit). By making the limit configurable, users are able to extend the limit to a duration appropriate to their connection speed.
Which issue this PR fixes
Fixes #51355
Special notes for your reviewer:
We plan to backport this to 1.6 and 1.7. To ease the backport work, we've kept this change to a minimum. After this PR we will submit an additional PR to rename
--min-request-timeout
to something that more clearly describes it's purpose, such as--long-running-request-timeout-min
.Release note: