aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorViktor Kuzmin <kvaster@gmail.com>2021-09-28 23:06:05 +0300
committerViktor Kuzmin <kvaster@gmail.com>2021-09-28 23:06:05 +0300
commit5c2298bd215959d78c881e5d48d96569b83ab3c7 (patch)
tree58bff4585789a6c3bc5fa5cd3f8c3370615e9c95 /README.md
parentbeba7b0d787c59fdbb394c1340302aa5ce3e5b93 (diff)
downloadseaweedfs-csi-driver-5c2298bd215959d78c881e5d48d96569b83ab3c7.tar.xz
seaweedfs-csi-driver-5c2298bd215959d78c881e5d48d96569b83ab3c7.zip
Allow static persistent volumes, some code cleanup
Diffstat (limited to 'README.md')
-rw-r--r--README.md65
1 files changed, 62 insertions, 3 deletions
diff --git a/README.md b/README.md
index 1acfe2a..cd15d94 100644
--- a/README.md
+++ b/README.md
@@ -67,13 +67,72 @@ When update DaemonSet ( DS ) break processes who implements fuse mount.
And now new pod not remount net device
For better safe update use ``node.updateStrategy.type: OnDelete`` in this need manual update. Steps:
- - delete DS pods on node where no exists seaweefs PV
+ - delete DS pods on node where no exists seaweedfs PV
- cordon or taint node
- evict or delete pods with seaweedfs PV
- delete DS pod on node
- uncordon or remove taint on node
- - repeat all steps on all nodes
-
+ - repeat all steps on [all nodes
+
+# Static and dynamic provisioning
+
+By default, driver will create separate folder (`/buckets/<volume-id>`) and will use separate collection (`volume-id`)
+for each request. Sometimes we need to use exact collection name or change replication options.
+It can be done via creating separate storage class with options:
+
+```
+kind: StorageClass
+apiVersion: storage.k8s.io/v1
+metadata:
+ name: seaweedfs-special
+provisioner: seaweedfs-csi-driver
+parameters:
+ collection: mycollection
+ replication: "011"
+```
+
+There is another use case when we need to access one folder from different pods with ro/rw access.
+In this case we do not need additional StorageClass. We need to create PersistentVolume:
+
+```
+apiVersion: v1
+kind: PersistentVolume
+metadata:
+ name: seaweedfs-static
+spec:
+ accessModes:
+ - ReadWriteMany
+ capacity:
+ storage: 1Gi
+ csi:
+ driver: seaweedfs-csi-driver
+ volumeHandle: dfs-test
+ volumeAttributes:
+ collection: default
+ replication: "011"
+ path: /path/to/files
+ readOnly: true
+ persistentVolumeReclaimPolicy: Retain
+ volumeMode: Filesystem
+```
+
+and bind ~~PersistentVolumeClaim(s) to it:
+
+```
+apiVersion: v1
+kind: PersistentVolumeClaim
+metadata:
+ name: seaweedfs-static
+spec:
+ storageClassName: ""
+ volumeName: seaweedfs-static
+ accessModes:
+ - ReadWriteMany
+ resources:
+ requests~~:
+ storage: 1Gi
+```
+
# License
[Apache v2 license](https://www.apache.org/licenses/LICENSE-2.0)