-
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
[KCP] Provide all endpoint when getting ETCD client #2844
Comments
/milestone v0.3.x |
/assign |
@gab-satchi let's hold on to this one until we have #2821 merged |
I think the dialler would need to be refactored to do something like this:
|
If we go down this path, how can we get a client to the leader directly? And how can we effectively write tests for these changes? |
Jason suggested using WithRequireLeader in another issue, but it just seems to require that a leader exists. |
What do you think about making a POC / small PR to see if the idea works out? Then we can discuss the design there, I want to make we have a test plan in place for any changes related to etcd. |
Agree with that approach. On top of having a test plan, I wanted to know if there's something I can reproduce locally to get etcd connections in a flaky state. Then see if the changes are improving that in any way. |
Constantly scaling up and down comes to mind, but most of our connections go through the leader now. And I think the newest machine gets assigned the leader while the oldest one is always the one to get deleted in a scale down. So unsure if that plan would work |
Yeah, a POC probably makes sense. Was going to mention WithRequireLeader, but we can add that in post, and is more applicable to watches than anything else. @gab-satchi . Using |
/close |
@gab-satchi: Closing this issue. 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. |
Instead of trying to get ETCD client for a specific node, provide all control plane nodes as endpoints and let clientv3.New() handle connecting to an available endpoint. This will simplify some of the logic in the code.
Kubeadm is using a similar logic:
https://github.com/kubernetes/kubernetes/blob/master/cmd/kubeadm/app/util/etcd/etcd.go
/kind cleanup
/area control-plane
The text was updated successfully, but these errors were encountered: