diff options
| author | Chris Lu <chrislusf@users.noreply.github.com> | 2021-09-28 13:42:55 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-28 13:42:55 -0700 |
| commit | 3683a0ae902c0a46bff36e027fa49250dfcbcb36 (patch) | |
| tree | c9aa46efe5977d10c280d850044ed2d942707500 /README.md | |
| parent | 597e2c539cf5a87cae1d15be6951c0c8307ef675 (diff) | |
| parent | 5c2298bd215959d78c881e5d48d96569b83ab3c7 (diff) | |
| download | seaweedfs-csi-driver-3683a0ae902c0a46bff36e027fa49250dfcbcb36.tar.xz seaweedfs-csi-driver-3683a0ae902c0a46bff36e027fa49250dfcbcb36.zip | |
Merge pull request #33 from kvaster/static_mounts
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 65 |
1 files changed, 62 insertions, 3 deletions
@@ -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) |
