Skip to content
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

Merged
merged 2 commits into from
Feb 6, 2019
Merged

Refactor csiDriversStore #73313

merged 2 commits into from
Feb 6, 2019

Conversation

hoegaarden
Copy link
Contributor

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/or RegistraionHandler), 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?:

NONE

/assign @vladimirvivien
@mariantalla

This allows us to hide
- the mutex handling
- the initialization
as implementation details.

Signed-off-by: Maria Ntalla <mntalla@pivotal.io>
@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Jan 25, 2019
@hoegaarden
Copy link
Contributor Author

@k8s-ci-robot k8s-ci-robot added sig/storage Categorizes an issue or PR as relevant to SIG Storage. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Jan 25, 2019
@hoegaarden
Copy link
Contributor Author

/retest

@hoegaarden
Copy link
Contributor Author

/restest

@hoegaarden
Copy link
Contributor Author

/test pull-kubernetes-integration
/test pull-kubernetes-e2e-gce

@vladimirvivien
Copy link
Member

@hoegaarden
Apologies for the late review. This looks good.
If you havent done so, please run this through e2e tests and post results.
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 4, 2019
@vladimirvivien
Copy link
Member

@hoegaarden since there's no behavior modification, you don't need e2e.

/approve

@k8s-ci-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 6, 2019
@k8s-ci-robot k8s-ci-robot merged commit 2d95638 into kubernetes:master Feb 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. release-note-none Denotes a PR that doesn't merit a release note. sig/storage Categorizes an issue or PR as relevant to SIG Storage. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants