-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
driver: validate capabilities for volume creation
We don't validate the capabilities during `CreateVolume()`. We should start doing it to avoid creating volumes that needs to be in different modes, such as `MULTI_NODE_MULTI_WRITER` (ReadWriteMany in k8s) or `MULTI_NODE_READER_ONLY` (ReadOnlyMany in k8s) Note that, there is a [bug](kubernetes-csi/external-provisioner#117) in the `external-provisioner` sidecar that passes down the Kubernetes `accessModes` fields to the CSI plugin. It currently passes a hardcoded value of `SINGLE_NODE_WRITER` (see: https://github.com/kubernetes-csi/external-provisioner/blob/4d8a86cc54901d4d14b56c03a6ee7dfe6482c9b1/pkg/controller/controller.go#L89), so this means currently it's not possible to create volumws with `ReadWriteMany` or `ReadOnlyMany` nevertheless. But it's good we have the check in place, so we'de protected once the issue in the provisioner is fixed in the future. closes #42
- Loading branch information
Showing
2 changed files
with
48 additions
and
36 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