forked from kubernetes-csi/external-provisioner
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Block volume support for CSI provisioner
In CSI provisioner, below three logics need to be implemented, to add Block volume support to CSI provisioner: 1. Add SupportsBlock that properly returns whether Storage Provider's plugin supports block (this is checked by using ValidateVolumeCapabilities), 2. Pass BlockVolume instead of MountVolume to CreateVolume if volumeMode is set to be Block on Provision, 3. Set volumeMode to PV returned by Provision. Also, below 4 test cases for TestSupportsBlock and 2 test cases for TestProvision are added. TestSupportsBlock: 1. ValidateVolumeCapabilities return (true, nil) case: return true expected 2. ValidateVolumeCapabilities return (false, nil) case: return false expected 3. ValidateVolumeCapabilities return (true, err) case: return false expected 4. ValidateVolumeCapabilities return (false, err) case: return false expected TestProvision: 1. volumeMode=Filesystem PVC case: return Filesystem PV expected 2. volumeMode=Block PVC case: return Block PV expected Fixes kubernetes-csi#110
- Loading branch information
Showing
2 changed files
with
197 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters