-
Notifications
You must be signed in to change notification settings - Fork 38.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
Refactor csiDriversStore #73313
Refactor csiDriversStore #73313
Conversation
This allows us to hide - the mutex handling - the initialization as implementation details. Signed-off-by: Maria Ntalla <mntalla@pivotal.io>
We have some evidence that this will be beneficial from the earlier spikes we did over here: |
/retest |
/restest |
/test pull-kubernetes-integration |
@hoegaarden |
@hoegaarden since there's no behavior modification, you don't need e2e. /approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hoegaarden, vladimirvivien 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:
This PR does a little bit of refactoring in the
pkg/volume/csi
package, there is no external facing change(¹).With those changes, the mutex handling and initialisation are handled internally and makes them an implementation detail other components do not need to know about and implement.
This is one little stepping stone towards removing any global state in the CSI package. This makes it a bit easier to pass the drivers list around, have it as a member of a struct (
Plugin
and/orRegistraionHandler
), potentially passing the list around in different functions/methods, ... without needing to care about the mutex.¹ Exception: More types are exported now (
csi.Diver
&csi.DriversList
) to enable blackbox testing.Special notes for your reviewer:
We want to remove all globals from
pkg/volume/csi
, we try to split it into as small PRs as we can. This is only the first of a series of PRs.Does this PR introduce a user-facing change?:
/assign @vladimirvivien
@mariantalla