-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Move kops-controller client into its own package #14727
Move kops-controller client into its own package #14727
Conversation
I can see moving Possibly pass in the authenticator as well, since non-bootstrap requests will probably have a different authenticator? |
Actually, |
b7059b2
to
7fb7648
Compare
I don't think we can use type parameters today with struct methods (unless you know a trick). I'm guessing you want to not move This refactor is to support updating gossip to just work through kops-controller. For that I was thinking of using GRPC, because I think we want streaming support rather than polling. I could just leave the existing QueryBootstrap client/logic where it is and make this a pure GRPC client - that would work too. A bit of a code duplication for connecting, but not too bad as the GRPC interfaces are a little different anyway. Would that be better for you? |
I sent you a PR to remove knowledge of the request and response types. I think it would be good to make the authenticator optional and possibly passed-in per request. I see there are two bootstrap requests to kops-controller. It would be good to consolidate them, preferably into the one that is a |
I don't want to move BootstrapRequest because I don't want that knowledge outside of nodeup. It should be obvious that only nodeup can bootstrap or authenticate as a bootstrapping instance. If you need GRPC features, then I suppose you need GRPC. I'd prefer to keep the bootstraprequest simple if possible, so that we can reason about its security. You could probably extract the connection logic into something shared by the REST and GRPC query methods. |
This should allow more reuse.
99abf36
to
bec27d0
Compare
Thanks @johngmyers - pulled in your change :-) |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: johngmyers 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 |
This should allow more reuse.