Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 12 commits into from
Jan 17, 2023

Conversation

Ruakij
Copy link
Contributor

@Ruakij Ruakij commented Jan 16, 2023

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:

  • None changes nothing and is the default
  • write_preferLocalDc sets the DataCenter-mount-option to the current Node-DataCenter, making writes local and reads wherever the data is.

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
Copy link
Contributor

Does this need a document change?

@Ruakij
Copy link
Contributor Author

Ruakij commented Jan 17, 2023

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
Copy link
Contributor

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

@Ruakij
Copy link
Contributor Author

Ruakij commented Jan 17, 2023

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.

@chrislusf chrislusf merged commit 9e412ba into seaweedfs:master Jan 17, 2023
@Ruakij Ruakij deleted the feat_dataLocality branch January 17, 2023 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants