-
Notifications
You must be signed in to change notification settings - Fork 42k
kubeadm: Add configurable control plane up timeout #70480
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
Conversation
2aa3aca to
7eb0e8c
Compare
neolit123
left a comment
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 @rosti
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.
should we use the default here 4m?
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.
I don't think it's necessary.
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.
I agree with @neolit123, please change to 4 b/c that's the default used all over.
7eb0e8c to
dd32858
Compare
timothysc
left a comment
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.
/approve
Generally looks like what we talked about, thx for the patch.
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.
I agree with @neolit123, please change to 4 b/c that's the default used all over.
fabriziopandini
left a comment
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 @rosti!
/approve
Waiting for dependency to merge before final lgtm
dd32858 to
486c8f3
Compare
|
Hold because of unmerged dependency PR. /hold |
Until now the control plane timeout was fixed to 4 minutes and users did not have the ability to change it. This commit allows that timeout to be configured via the new `timeoutForControlPlane` option in the API server config (itself a member of the ClusterConfiguration). The default timeout is still 4 minutes. Signed-off-by: Rostislav M. Georgiev <[email protected]>
486c8f3 to
eb6f7b1
Compare
|
/hold cancel |
|
https://github.com/kubernetes/kubernetes/blob/master/cmd/kubeadm/app/util/apiclient/wait.go#L159 |
|
@neolit123 @rosti
|
|
i think what has to be done here is not use exponential backoff in WaitForHealthyKubelet, but rather allow us to make the function match a timeout the user has specified - e..g. DefaultKubeletTimeout |
|
|
||
| // TODO: NewControlPlaneWaiter should be converted to private after the self-hosting phase is removed. | ||
| waiter, err := phases.NewControlPlaneWaiter(i.dryRun, client, i.outputWriter) | ||
| timeout := i.cfg.ClusterConfiguration.APIServer.TimeoutForControlPlane.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.
Why declaring this var, which is used only once?
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.
That's because the expression to take the timeout value is huge and best viewed on a single line. Also the call to NewControlPlaneWaiter on the following line continues to fit on screen.
|
@neolit123 I agree with you, that the waiter code can be simplified a bit (to say the least), but perhaps this is a job for another PR? |
fabriziopandini
left a comment
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.
@rosti Thanks for this PR!
/approve
/lgtm
@neolit123 @dixudx we can eventually iterate on details, but I'm moving on with this PR to get all the API changes in before code slush
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fabriziopandini, rosti, timothysc The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Until now the control plane timeout was fixed to 4 minutes and users did not have the ability to change it. This commit allows that timeout to be configured via the new
timeoutForControlPlaneoption in the API server config (itself a member of the ClusterConfiguration).The default timeout is still 4 minutes.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close the issue(s) when PR gets merged):Refs kubernetes/kubeadm#911
Special notes for your reviewer:
This PR depends on:
Please, review only the last commit here.
This PR does not modify the self hosting timeout code, which is going to be deleted in another PR:
/cc @kubernetes/sig-cluster-lifecycle-pr-reviews
/area kubeadm
/assign @fabriziopandini
/assign @timothysc
Does this PR introduce a user-facing change?: