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 #630

Merged

Conversation

chrishenzie
Copy link
Contributor

@chrishenzie chrishenzie commented May 8, 2021

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`.

@k8s-ci-robot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. 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 8, 2021
@k8s-ci-robot k8s-ci-robot requested review from lpabon and msau42 May 8, 2021 03:10
@k8s-ci-robot k8s-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label May 8, 2021
@chrishenzie chrishenzie marked this pull request as ready for review May 15, 2021 18:24
@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 May 15, 2021
@chrishenzie chrishenzie changed the title Map PV access modes to CSI access modes based on driver capability WIP: Map PV access modes to CSI access modes based on driver capability May 15, 2021
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 15, 2021
@chrishenzie
Copy link
Contributor Author

/assign @msau42
/assign @jingxu97

@humblec
Copy link
Contributor

humblec commented Jun 25, 2021

@chrishenzie ( just as a suggestion) it may be easy to have table/matrix representation of ToCSIAccessMode logic in source code comment or in the PR to make sure we are covering all the scenario..

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 30, 2021
@chrishenzie
Copy link
Contributor Author

chrishenzie commented Jul 14, 2021

@humblec I've added the tables to kubernetes-csi/csi-lib-utils#89, PTAL, I plan on depending on this library across our sidecars, I just need to update this one to do that.

@humblec
Copy link
Contributor

humblec commented Jul 23, 2021

@humblec I've added the tables to kubernetes-csi/csi-lib-utils#89, PTAL, I plan on depending on this library across our sidecars, I just need to update this one to do that.

@chrishenzie Thanks 👍 , it really helps !

@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 28, 2021
@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 #656 which is blocked on release of v1.22.

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 28, 2021
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 29, 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

/assign @jsafrane

@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 74d3c4c into kubernetes-csi:master Aug 5, 2021
@chrishenzie chrishenzie deleted the single-node-access-modes branch August 5, 2021 17:00
@msau42 msau42 mentioned this pull request Aug 11, 2021
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.

None yet

6 participants