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

Map PV access modes to CSI access modes based on driver capability #308

Merged

Conversation

chrishenzie
Copy link
Contributor

What type of PR is this?
/kind feature

What this PR does / why we need it:
See KEP#2485 for more details.

This PR introduces mappings between Kubernetes PV access modes and CSI access modes. If the CSI driver supports the SINGLE_NODE_MULTI_WRITER controller capability, map ReadWriteOnce to SINGLE_NODE_MULTI_WRITER and ReadWriteOncePod to SINGLE_NODE_SINGLE_WRITER. If the CSI driver does not support this controller capability, map ReadWriteOnce to SINGLE_NODE_WRITER (current behavior preserved for backwards compatibility).

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:
The CSI spec change PR#476 is here and just requires merging. Until then, I have a placeholder commit using my forked version of the CSI spec.

Similarly for K8s, the API change and feature addition PR#102028 is here and still is in the early stages of review. Until then, I have a placeholder commit using my forked version of the K8s API.

Does this PR introduce a user-facing change?:

Adds mappings for PV access modes to new CSI access modes: `SINGLE_NODE_SINGLE_WRITER` and `SINGLE_NODE_MULTI_WRITER`.

/assign @msau42
/assign @jingxu97

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels May 16, 2021
@k8s-ci-robot k8s-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label May 16, 2021
pkg/controller/util.go Outdated Show resolved Hide resolved
pkg/controller/util.go Outdated Show resolved Hide resolved
@chrishenzie chrishenzie force-pushed the single-node-access-modes branch 2 times, most recently from dc26ef0 to e4c4d38 Compare June 3, 2021 01:04
Copy link
Contributor

@jsafrane jsafrane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have couple of nits, but the PR goes the right direction.

@chrishenzie chrishenzie force-pushed the single-node-access-modes branch 2 times, most recently from 887792f to f4499f0 Compare June 14, 2021 22:21
@chrishenzie chrishenzie force-pushed the single-node-access-modes branch 3 times, most recently from 032fd34 to 282fa01 Compare July 28, 2021 03:27
@chrishenzie chrishenzie changed the title WIP: Map PV access modes to CSI access modes based on driver capability Map PV access modes to CSI access modes based on driver capability Jul 28, 2021
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 28, 2021
@chrishenzie
Copy link
Contributor Author

/hold

Rebased on #317 which is blocked on release of v1.22.

@k8s-ci-robot k8s-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jul 28, 2021
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Aug 4, 2021
@chrishenzie
Copy link
Contributor Author

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 4, 2021
@chrishenzie
Copy link
Contributor Author

@jsafrane PTAL, this is ready for review

@jsafrane
Copy link
Contributor

jsafrane commented Aug 5, 2021

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 5, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chrishenzie, jsafrane

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 Aug 5, 2021
@k8s-ci-robot k8s-ci-robot merged commit 6718e0b into kubernetes-csi:master Aug 5, 2021
@chrishenzie chrishenzie deleted the single-node-access-modes branch August 5, 2021 07:39
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/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. 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.

5 participants