aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md2
-rw-r--r--pkg/driver/nodeserver.go4
2 files changed, 6 insertions, 0 deletions
diff --git a/README.md b/README.md
index 2597a0d..fb30c2d 100644
--- a/README.md
+++ b/README.md
@@ -94,6 +94,7 @@ provisioner: seaweedfs-csi-driver
parameters:
collection: mycollection
replication: "011"
+ diskType: "ssd"
```
There is another use case when we need to access one folder from different pods with ro/rw access.
@@ -116,6 +117,7 @@ spec:
collection: default
replication: "011"
path: /path/to/files
+ diskType: "ssd"
readOnly: true
persistentVolumeReclaimPolicy: Retain
volumeMode: Filesystem
diff --git a/pkg/driver/nodeserver.go b/pkg/driver/nodeserver.go
index 8d2277a..968f5e4 100644
--- a/pkg/driver/nodeserver.go
+++ b/pkg/driver/nodeserver.go
@@ -63,6 +63,10 @@ func (ns *NodeServer) NodePublishVolume(ctx context.Context, req *csi.NodePublis
collection = volumeID
}
+ if diskType, ok := volContext["diskType"]; ok {
+ ns.Driver.DiskType = diskType
+ }
+
mounter, err := newMounter(path, collection, req.GetReadonly(), ns.Driver, volContext)
if err != nil {
return nil, err