seaweedfs / seaweedfs-csi-driver

SeaweedFS CSI Driver https://github.com/seaweedfs/seaweedfs
Apache License 2.0
211 stars 50 forks source link

DataLocality for initially auto-applying DataCenter mount-option #102

Closed Ruakij closed 1 year ago

Ruakij commented 1 year ago

DataLocality (inspired by Longhorn) allows instructing the storage-driver which volume-locations will be used or preferred in Pods to read & write.

It auto-sets mount-options based on the location a pod is scheduled in and the locality-option wanted. The option can be set and overridden in Deployment, StorageClass and PersistentVolume.

Currently only 2 options exist:


Unfortunately Kubernetes doesnt allow grabbing node-labels, which contain well-known region-labels, and setting them as environment-variables. The DownwardAPI is very limited in that regard. (see #40610)

Therefore i have modified the helm-chart to include a workaround using KubeMod based on this comment. More explanations in deploy/helm/seaweed-csi-driver/values.yml in the key node.injectTopologyInfoFromNodeLabel

If this isnt wanted, feel free to remove it.

chrislusf commented 1 year ago

Does this need a document change?

Ruakij commented 1 year ago

It doesnt change existing stuff, but the new features should of course get proper documentation. Some other stuff is also missing documentation, like available parameters for StorageClass or PersistentVolume.

I could start and create a first documentation how to use it and how to inject topology-info. Think its a good idea to create new Readme-files and structure them? (Am not a fan of the Github Wiki as its technically not "inside" the git-repo)

chrislusf commented 1 year ago

Yes, please help to document. Maybe just append a section to the main README.md file for now.

Ruakij commented 1 year ago

I have restructured the Readme a little bit, added an index as its getting quite long and have added documentation for DataLocality.

If you dont like the spaces between sections, feel free to remove them.