Open
Conversation
NFS Provisioner: Changing provisioned volume mode to 0777 Changing provisioned volume mode to 0777. This is to allow non-root consumer pod to gain access to the volume. The consumer pod should be responsible for preparing the volume (i.e. changing the permission to proper values). Also includes a band aid fix on go.mod for building Signed-off-by: Kaihua Zhou <Kaihua.Zhou@ibm.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
NFS Provisioner: Changing provisioned volume mode to 0777
Description of your changes:
Changing provisioned volume mode to 0777 by adding a chmod call after the dir is created
This is to allow non-root consumer pod to gain access to the volume. It is quite common now that pods are running as non-root user (sometimes even with restricted SCC). The consumer pod should be responsible for preparing the volume (i.e. changing the permission to proper values)
I also added on replace clause in go.mod otherwise it won't build (see #39).
Which issue is resolved by this Pull Request:
Resolves #
Resolves #22 and potentially a band-aid fix for #39
I've tested this change using a dev build running on Openshift 4.8 with portworx backing the server. With this change non-root pods are able to mount provisioned volume and gain access.
Checklist:
make codegen) has been run to update object specifications, if necessary.