-
Notifications
You must be signed in to change notification settings - Fork 78
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
Subdirectory provisioning #272
Subdirectory provisioning #272
Conversation
Welcome @KanchiShimono! |
Hi @KanchiShimono. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Hi @KanchiShimono, can you resolve the merge conflicts + rebase the commits you made for readability purposes? |
…enerate-kustomize
5bf580d
to
1737a50
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: KanchiShimono The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/ok-to-test |
securityContext: | ||
privileged: true |
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.
How does this change affect subdirectory provisioning and why is it needed?
securityContext: | ||
privileged: true |
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.
same comment as here: https://github.com/kubernetes-sigs/aws-fsx-csi-driver/pull/272/files#r1059149727
@@ -6,3 +6,4 @@ metadata: | |||
name: fsx.csi.aws.com | |||
spec: | |||
attachRequired: false | |||
fsGroupPolicy: ReadWriteOnceWithFSType |
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.
Based on the documentation: https://kubernetes-csi.github.io/docs/support-fsgroup.html it seems like not specifying the fsGroupPolicy policy will default to ReadWriteOnceWithFSType. Is this change needed & could this have any impact on any usecases for csi driver?
In theory, couldn't a subdirectory be mounted by simply mounting the PV, with a mountname like "mount/subfolder"? I don't have FSx running to test this myself |
Hi @kibblerz, from my understanding you can mount a subdirectory like you suggested, but the idea behind this PR is being able to provision the subdirectory using the csi driver. |
@KanchiShimono: PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
}() | ||
|
||
// Delete subDir (dnsname@tcp:/mountname/baseDir/subDir) under the tempMountPathPrefix/tempUUID | ||
if err := os.RemoveAll(filepath.Join(target, fsxVolume.subDir)); err != nil { |
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.
subDir and baseDir may need validation for relative paths. what happens if I set subDir to nonsense like ../
mountname: [MountName] | ||
# set the basedir and subdir if you wanted to mount subdir |
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.
in kubernetes the volumehandle must uniquely identify the volume. if you try to mount two PVC+PV on the same node and they have the same volumehandle but different volumeattributes.subdir, I don't think it works. this is why in EFS we removed the path volumeattribute and stuffed everything into the volumehandle like [FileSystemId]:[Path] instead. https://github.com/kubernetes/kubernetes/blob/497e0dfd33b180fcc3855aad794d87f0e429c82c/pkg/volume/csi/csi_plugin.go#L316
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close |
@k8s-triage-robot: Closed this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Is this a bug fix or adding new feature?
New feature.
Attempt to implement subdirectory provisioning requested in #247.
What is this PR about? / Why do we need it?
PR summary:
Why do we need?:
What testing is done?
Run unit test on my local machine by running
make test
.Also deploy and check on my EKS cluster.