-
Notifications
You must be signed in to change notification settings - Fork 61
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
feat(nfs-server): change shared filesystem ownership and mode #125
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #125 +/- ##
===========================================
+ Coverage 49.79% 50.12% +0.32%
===========================================
Files 38 38
Lines 2705 2789 +84
===========================================
+ Hits 1347 1398 +51
- Misses 1255 1285 +30
- Partials 103 106 +3
Continue to review full report at Codecov.
|
3b6b082
to
bee14ca
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good but good to have the following things:
- Integration test for a new feature
- Documentation and helm changes as separate PR(also update vanilla YAML's about new feature with comments). If we have a document along with this PR then users may assume feature exists in a released version which don't want to happen, so good to have different PR for release related work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Provided few minnor comments
bd1bfa3
to
f3a00af
Compare
This PR depends on #129 . |
2b6c514
to
8b2aa83
Compare
Signed-off-by: Niladri Halder <[email protected]>
Signed-off-by: Niladri Halder <[email protected]>
Signed-off-by: Niladri Halder <[email protected]>
…tartup script Signed-off-by: Niladri Halder <[email protected]>
Signed-off-by: Niladri Halder <[email protected]>
Signed-off-by: Niladri Halder <[email protected]>
Signed-off-by: Niladri Halder <[email protected]>
Signed-off-by: Niladri Halder <[email protected]>
Signed-off-by: Niladri Halder <[email protected]>
Signed-off-by: Niladri Halder <[email protected]>
…unnecessary comparisons, add unit tests Signed-off-by: Niladri Halder <[email protected]>
Signed-off-by: Niladri Halder <[email protected]>
Signed-off-by: Niladri Halder <[email protected]>
Signed-off-by: Niladri Halder <[email protected]>
Signed-off-by: Niladri Halder <[email protected]>
Signed-off-by: Niladri Halder <[email protected]>
…imize logic in dataConfigToMap() method, log message in GetFsMode() and GetFsGID() methods, nil pointer check in BDD test, remove unused method Signed-off-by: Niladri Halder <[email protected]>
Signed-off-by: Niladri Halder <[email protected]>
Signed-off-by: Niladri Halder <[email protected]>
a239356
to
6d4c330
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: Niladri Halder <[email protected]>
Why is this PR required? What issue does it fix?:
Resolves: #122
This PR allows a user to change the ownership and file mode parameters of the filesystem shared using NFS.
What this PR does?:
This PR introduces the FilePermissions
cas.openebs.io/config
PersistentVolumeClaim key. The data keys included within this config key are UID, GID and mode. The openebs-nfs-provisioner process sets the values from these PersistentVolumeClaim keys into the ENVs FILEPERMISSIONS_UID, FILEPERMISSIONS_GID and FILEPERMISSIONS_MODE.The /nfs-server-container/nfsd.sh script issues
chmod
andchown
commands to change the ownership and file mode of the shared filesystem directory (backend volume at /nfsshare). The checking criteria is similar to the Kubernetes fsGroupChangePolicy OnRootMismatch.NOTE: This also generates logs which announce the deprecation of the FSGID
cas.openebs.io/config
option in future releases. FSGID-like changes can be accomplished with FilePermissions. Instructions for this have been furnished in the user documentation(#128).If 'FSGID' is specified, and 'GID' and/or 'mode' FilePermissions keys are also specified, this is treated as an invalid input and provisioning fails. This is done to keep the file permissions strictly declarative.
Sample PersistentVolumeClaim:
Does this PR require any upgrade changes?:
No.