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
KCM: specifies the upper-bound timeout limit for outgoing requests #99358
Conversation
Previously no timeout was set. Requests without explicit timeout might potentially hang forever and lead to starvation of the application.
@@ -434,6 +435,7 @@ func (s KubeControllerManagerOptions) Config(allControllers []string, disabledBy | |||
kubeconfig.ContentConfig.ContentType = s.Generic.ClientConnection.ContentType | |||
kubeconfig.QPS = s.Generic.ClientConnection.QPS | |||
kubeconfig.Burst = int(s.Generic.ClientConnection.Burst) | |||
kubeconfig.Timeout = 70 * time.Second // slightly bigger than the default server timeout which is 60 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.
FYI, this would put timeout=70s
to the request URI and the apiserver would truncate it to 60s
:)
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.
yeah, so the requests should be timed out after 60s if not then we know there was something that was holding up requests, for example, a proxy.
/triage accepted |
/retest |
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.
/lgtm
I'd probably provide a bit more details behind the importance of that timeout being set, given you've spend a great deal of time debugging these issues.
/assing @sttts for approval |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: p0lyn0mial, soltysh, sttts The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
It doesn't hurt us that much (yet?), but until the timeout is common for watches and regular requests, I think we should revert this. |
Thanks, I'm going to revert the PR. |
What type of PR is this?
/kind bug
What this PR does / why we need it:
This PR sets a timeout for the client-go client used by KCM. Previously no timeout was set. Requests without explicit timeout might potentially hang forever and lead to starvation of the application.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: