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
dynamic resource allocation: reuse gRPC connection #118619
Conversation
3638706
to
c3ded02
Compare
/assign @bart0sh |
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.
Thank you for the PR! A couple of minor things, but overall lgtm.
/triage accepted |
/cc @klueska |
/test pull-kubernetes-e2e-gce |
@bart0sh @klueska After spending a lot of time trying to understand what was going wrong during kind-dra pipeline I came to the conclusion that it is related to the way we detect the version and the changes I made after @pohly PR was merged. I reverted back to how it was and only kept the reuse of the gRPC connection as well as the test covering it. |
/test pull-kubernetes-kind-dra |
/test pull-kubernetes-e2e-gce |
Could an end user spot the difference before and after this change? If so, we should changelog it. |
@sftim I guess yes, before there should be more open file descriptors than after. What about ?
|
I'll let the approvers check the changelog entry. In the meantime, please remove the “none” marker. |
…gRPC connection Signed-off-by: TommyStarK <thomasmilox@gmail.com>
/lgtm |
LGTM label has been added. Git tree hash: 9193c91512da0029811ab99ad742f3d9eccc04ff
|
@klueska As we agreed this PR only focuses on the reuse of the gRPC conn, nothing else. I am starting to work on the refactoring of the client based on your feedbacks. If you are ok I think we can cancel the hold |
/unhold |
/retest |
} | ||
|
||
return drapb.NewNodeClient(conn), drapbv1alpha2.NewNodeClient(conn), conn, nil | ||
pluginName string |
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 you need to necessarily address my comments below in this PR, but I think this code needs a major overhaul in general. It was copied from some CSI plugin code, and some remnants of that are still here.
For example. this type now consists of just the name
of the plugin and a reference to the plugin itself. As such, it feels weird to have two separate types for Plugin
and draPluginClient
. Can they both be merged into a single type? Moreover, what is the value in making the Plugin
and PluginStore
types public? Are these actually used any where externally? Also, the functions / types defined in each file don't necessarily correlate with what's contained in each file. We should do a proper audit of the code before adding any further PRs on top of this one.
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.
After a quick look, I think you are right and we could merge Plugin
and draPluginClient
into a single one. It appears that the plugin store is only being used under dra so we could make it private. I will take these feedbacks into consideration when proposing a rework of the client/plugin code.
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: klueska, TommyStarK 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 |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
Avoids to create a new gRPC connection each time
NodePrepareResource
orNodeUnprepareResource
are called.Which issue(s) this PR fixes:
Fixes #113832
part of #118661
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: