csi-s3
csi-s3 copied to clipboard
Adding ability to specify uid/gid when using goofys.
With this change, while setting up your StorageClass, you can specify the uid and gid that goofys should use when mounting your file system. These two new options are goofysuid and goofysgid.
This helps with #21 however it doesn't allow specifying specific directory or file permissions for the mounted volume.
The build for this commit is passing in gitlab https://gitlab.com/rexm/csi-s3/commit/b54578fc3ea647226d9338a87e2c4f41a8faef5f
If there's a good way to write tests for this or a better way to go about it, please let me know.
Thanks a lot for the PR!
Looking good as far as I can see, I'm guessing attrib contains the storageclass parameters? https://github.com/ctrox/csi-s3/blob/b54578fc3ea647226d9338a87e2c4f41a8faef5f/pkg/s3/nodeserver.go#L73
This was not used before and just logged so far.
As for testing, this is a bit hard because currently it just runs the CSI sanity test suite for all the different mounters. What you could do is add your new uid/gid options here: https://github.com/ctrox/csi-s3/blob/b54578fc3ea647226d9338a87e2c4f41a8faef5f/pkg/s3/s3-driver_suite_test.go#L34-L36
Like that at least we are sure the goofys mounting command does not return any errors but to test if it actually set the correct uid/gid we would have to somehow hook a function in there after the mount, not sure if this is possible with the sanity tests.
Also thanks for going through the trouble and cloning the repo to GitLab, I have setup a webhook here but sadly it looks like GitLab currently cannot deal with PRs as they are not mirrored to that repository.
Any news on that PR @ctrox?
Hi, this project ended up not being suited to my use case and I ended up going another route. Because of that, I haven’t moved forward with writing the tests and probably won’t have time to anytime soon.
I apologize if people were waiting for this to get merged.
Hi @ctrox @RexMorgan I want this feature, can I open a new PR to complete this feature?
@arugal Sure, go ahead!