-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
✨ Enable configuring the kube config timeout #8865
✨ Enable configuring the kube config timeout #8865
Conversation
Welcome @cnmcavoy! |
Hi @cnmcavoy. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the 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. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
c85cc2d
to
1339b83
Compare
restConfig := ctrl.GetConfigOrDie() | ||
restConfig.QPS = restConfigQPS | ||
restConfig.Burst = restConfigBurst |
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.
Is there a reason Timeout
is not also defined here?
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.
The kubernetes clients used for the management clusters never had a timeout assigned in any of the various main.go
and I didn't want to introduce a unintended change in behavior.
If we prefer consistency, I can add the timeout here as well.
|
||
fs.IntVar(&restConfigBurst, "kube-api-burst", 30, | ||
"Maximum number of queries that should be allowed in one burst from the controller client to the Kubernetes API server. Default 30") | ||
remote.AddRestConfigFlags(fs) |
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.
This helper is very obviously pulling its weight! 🙌
/ok-to-test |
/hold |
Agreed this doesn't address the issue with drain, but this does configure both workload and management cluster clients AFAIK - just not for drain. |
I'm not sure this applies to workload clusters, could you kindly point me to where this is happening |
You can see this on the change in #8882. The
|
This feels like a very implicit way of configuring the ClusterCacheTracker |
1339b83
to
2f681d3
Compare
Can you clarify? I'm not really sure what you mean.
I commented over in the issue, but the HTTP timeout is very much what we are interested in. If we feel that making the QPS flags consistent is an unwanted change, I can revert that part and make this PR only the timeout. |
Sorry that was not very actionable and clear feedback :). What I meant is I don't like to introduce flags, which are then writing package global variables and thus affect the behavior of the ClusterCacheTracker and the RESTConfig func. There are folks using CAPI as a library and use ClusterCacheTracker directly. I don't want to force them to have to use the flags to be able to configure the timeouts. I would prefer something like what we did with flags.TLSOptions. Provide a util to define the flags and then explicitly hand them over (in the TLSOptions case to the webhookserver, in our case here to the ClusterCacheTracker).
I think you're right that this would change the timeout used for draining (but also more). Let's continue the discussion on the issue and once we have consensus come back to the PR. |
Closed in preference to #8917 |
What this PR does / why we need it:
Allows configuring the kubernetes client configuration timeout. Also moves the other related configuration into a standard place and reduces duplicated logic in various main functions.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #8864