Support exposing user, group and perm patterns - #560
Conversation
|
This has been verified. The following PVC was used to test: The resulting directory: |
|
@derekbit Could I get a review please? |
|
@innobead Could I get a review please? |
Sure. I will review it soon. |
|
@derekbit Could I get a review please? |
Sure. Sorry for the late review. |
|
This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days. |
|
I think this could still be useful. |
|
@derekbit Could this get a review please? |
|
@derekbit This could still use a review please. |
There was a problem hiding this comment.
Pull request overview
Adds support for rendering StorageClass-configured userPattern, groupPattern, and permPattern templates from PVC metadata and exposing the results to helper setup/teardown scripts via new environment variables, enabling safer default ownership/mode for provisioned directories.
Changes:
- Add
userPattern/groupPattern/permPatternresolution and pass results to the helper pod asVOL_USER/VOL_GROUP/VOL_PERM. - Extend the Helm chart to optionally set these patterns as StorageClass parameters.
- Document the new environment variables and pattern behavior in the README.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| README.md | Documents new VOL_USER/VOL_GROUP/VOL_PERM env vars and pattern usage. |
| provisioner.go | Implements pattern rendering and injects rendered values into helper pod env. |
| deploy/chart/local-path-provisioner/values.yaml | Adds chart values for user/group/perm patterns. |
| deploy/chart/local-path-provisioner/templates/storageclass.yaml | Wires chart values into StorageClass parameters. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This is still untested but the idea is to allow the setup command to be this:
We are overloading local-path-provisioner to allow PVC storage onto our cluster filesystems and having root:root and 0777 on a shared resource is far from ideal especially when we sometimes deal with very sensitive data on our clusters where a 0777 directory behind a 0700 directory still raises red flags.