-
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
✨ KubeadmControlPlane scale up serially #2193
✨ KubeadmControlPlane scale up serially #2193
Conversation
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.
sweet, this looks good, i wanted to get rid of that for loop for a while 😄
controlplane/kubeadm/controllers/kubeadm_control_plane_controller.go
Outdated
Show resolved
Hide resolved
controlplane/kubeadm/controllers/kubeadm_control_plane_controller.go
Outdated
Show resolved
Hide resolved
yes |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: dlipovetsky 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 |
(The delete-related unit tests are failing, because they relied on the earlier, permissive, scale-up functionality to create a control plane for testing delete. Will fix) |
34473ac
to
33c7cac
Compare
33c7cac
to
5486644
Compare
@chuckha All unit tests pass, but that's because they inject a fake etcd client getter into How do you want to proceed? Do you want me to pull out the etcd healthcheck code into its own PR and merge that, then come back to this once you've merged your "etcd client getter"? |
I'll PR the etcd client getter then we an revisit this |
@dlipovetsky actually i'm going to PR against your branch so I can work it in seamlessly |
limitations under the License. | ||
*/ | ||
|
||
// Modified copy of k8s.io/apimachinery/pkg/util/sets/int64.go |
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.
What got modified? Curious why we can't use this out of the box
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.
hmm, is it mainly modifying for uint64? If so, can we leverage the set-gen
code generator instead of a hand-edited copy 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.
Yes, upstream is Int64.
If so, can we leverage the set-gen code generator instead of a hand-edited copy here?
Funny you should ask. I wanted to do this for a different type months ago; it didn't work, and I filed an issue back then: kubernetes/code-generator#74. Not sure if that problem was fixed since, though.
Signed-off-by: Daniel Lipovetsky <dlipovetsky@d2iq.com>
Signed-off-by: Chuck Ha <chuckh@vmware.com>
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.
Awesome work @dlipovetsky and @chuckha, a few comments, otherwise this is looking great.
controlplane/kubeadm/controllers/kubeadm_control_plane_controller.go
Outdated
Show resolved
Hide resolved
limitations under the License. | ||
*/ | ||
|
||
// Modified copy of k8s.io/apimachinery/pkg/util/sets/int64.go |
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.
hmm, is it mainly modifying for uint64? If so, can we leverage the set-gen
code generator instead of a hand-edited copy here?
1f4e55d
to
5fc8b1c
Compare
5fc8b1c
to
3ff0876
Compare
- Pass context to cluster client - Fix formatting - Fix linter errors - Also rename FilterMachines to FilterMachine - Remove unused code - Remove whitespace Signed-off-by: Daniel Lipovetsky <dlipovetsky@d2iq.com>
3ff0876
to
225f97b
Compare
/hold cancel |
Signed-off-by: Daniel Lipovetsky <dlipovetsky@d2iq.com>
@dlipovetsky: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. |
This PR organically grew too large. We split this into multiple PRs, and reviewers were nice enough to copy over the unresolved comments. Closing this PR. |
What this PR does / why we need it:
The control plane needs to be scaled one replica at a time. Also, before a replica is added with, all etcd endpoint should be healthy, and all existing members should be started.
This PR is a collaborative effort. I started the etcd health check work in the scale up function itself. @chuckha factored that out. More importantly, he added abstractions for the management and target cluster, and wired up the etcd client (merged in #2237).
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 #2016, #2243
/hold
/assign @randomvariable @detiber