kubernetes-sigs / azurelustre-csi-driver

Apache License 2.0
12 stars 22 forks source link

Add sub-dir functionality #151

Closed dabradley closed 10 months ago

dabradley commented 11 months ago

This commit adds the ability for pods to bind to a Lustre volume in a specified subdirectory. The pod that binds the volume in this way can only see that path and the paths under it. It has no access or visibility to other paths above it in the Lustre filesystem.

This has been implemented similarly to other CSI drivers to meet user expectations, but has the added benefit of allowing the user to leverage metadata from both the pvc/pv metadata and the pod's metadata as well.

Numerous checks have been put in place to ensure that data outside of the requested subdirectory is not deleted and that read only volumes are handled reasonably.

The long-haul tests have had compatible subdirectory values set to exercise this functionality while still maintaining its expectations as to data persistence, etc.

This is largely based on the implementations in the nfs and smb drivers, but it operates on a per-pod basis.

Design document (for MSFT employees) here: https://dev.azure.com/msazure/One/_git/Avere-laaso-doc/pullrequest/9149798

What type of PR is this? /kind feature

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

Requirements:

Special notes for your reviewer:

Release note:

none
dabradley commented 10 months ago

@joe-atzinger This is the major feature I'm trying to get out the door. Let me know if you have any feedback on this so I can try to get this one moving

k8s-ci-robot commented 10 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dabradley, joe-atzinger, t-mialve

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/kubernetes-sigs/azurelustre-csi-driver/blob/main/OWNERS)~~ [joe-atzinger] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment