-
Notifications
You must be signed in to change notification settings - Fork 554
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
Introduce Controller with Create and Delete Volume capability. Adds support for Dynamic Provisioning via access points #274
Conversation
Hi @kbasv. 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. |
/ok-to-test |
d7e43c8
to
22ccd19
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.
Thank you for your work on this! One other nit: Can you run goimports
on the files you modified here?
go get golang.org/x/tools/cmd/goimports
find . -name \*.go -not -path './vendor/*' -exec goimports -w {} \;
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.
I assume you are working on e2e tests at least for the happy path?
a00050c
to
4faa95e
Compare
pkg/driver/controller.go
Outdated
//Mount File System at it root and delete access point root directory | ||
mountOptions := []string{"tls"} | ||
target := TempMountPathPrefix + "/" + accessPointId | ||
if err := d.mounter.MakeDir(target); err != nil { | ||
return nil, status.Errorf(codes.Internal, "Could not create dir %q: %v", target, err) | ||
} | ||
if err := d.mounter.Mount(fileSystemId, target, "efs", mountOptions); err != nil { | ||
os.Remove(target) | ||
return nil, status.Errorf(codes.Internal, "Could not mount %q at %q: %v", fileSystemId, target, err) | ||
} | ||
os.RemoveAll(target + accessPoint.AccessPointRootDir) | ||
err = d.mounter.Unmount(target) |
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.
This is saying on an arbitrary node (where the controller pod is assigned with), mount the EFS volume, delete the content, and unmount after.
I think this is OK but would like @wongma7 to double check.
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.
It looks OK to me as long as the behavior is behind a flag and well documented.
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.
IMO deleteAccessPointRootDir should default true to match kubernetes expectations where Delete means data is gone.
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.
Can we update example how to run dynamic provisioning with efs driver?
@@ -102,6 +103,26 @@ func (e *efsDriver) GetPersistentVolumeSource(readOnly bool, fsType string, volu | |||
return &pvSource, nil | |||
} | |||
|
|||
func (e *efsDriver) GetDynamicProvisionStorageClass(config *testsuites.PerTestConfig, fsType string) *storagev1.StorageClass { |
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.
Is implementing GetDynamicProvisionStorageClass
how to enable upstream dynamic provision tests?
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.
Yeah, this allows the test suites to detect and run dynamic provision tests
@jqmichael I will be creating adding examples and documentation in a follow up PR |
kubectl apply -f serviceaccount-csi-controller.yaml node.yaml csidriver.yaml controller.yaml clusterrole-provisioner.yaml clusterrolebinding-provisioner.yaml After all apply, the controller component fails to start controller logs: I0106 03:02:23.058741 1 connection.go:186] GRPC error: rpc error: code = Unimplemented desc = unknown service csi.v1.Controller
F0106 03:02:23.058758 1 csi-provisioner.go:188] Error getting CSI driver capabilities: rpc error: code = Unimplemented desc = unknown service csi.v1.Controller |
@wangycc what is the image in the controller.yaml? it should be |
@wongma7 amazon/aws-efs-csi-driver:latest,When do you plan to push the controller image? We started to try. |
Most application charts don't usually create `StorageClass`es. They create PVCs. This is extending the work done in kubernetes-sigs#274. The chart itself is kind of broken unless `image.tag` is set to "master". kubernetes-sigs#291 will probably address that.
Most application charts don't usually create `StorageClass`es. They create PVCs. This is extending the work done in kubernetes-sigs#274. The chart itself is kind of broken unless `image.tag` is set to "master". kubernetes-sigs#291 will probably address that.
Most application charts don't usually create `StorageClass`es. They create PVCs. This is extending the work done in kubernetes-sigs#274. The chart itself is kind of broken unless `image.tag` is set to "master". kubernetes-sigs#291 will probably address that.
Most application charts don't usually create `StorageClass`es. They create PVCs. This is extending the work done in kubernetes-sigs#274. The chart itself is kind of broken unless `image.tag` is set to "master". kubernetes-sigs#291 will probably address that.
Most application charts don't usually create `StorageClass`es. They create PVCs. This is extending the work done in kubernetes-sigs#274. The chart itself is kind of broken unless `image.tag` is set to "master". kubernetes-sigs#291 will probably address that.
I'm a bit confused. This is not part of the 1.1 release, right? Will there be a new release any time soon? |
@Skaronator right, this was merged into master branch but excluded from 1.1 release. I don't have ETA for when this will be released |
I'm following the link to this issue from this document. Is it now part of the official release? |
it would help to have an update on when support for dynamic provisioning will be released. Creating multiple accesspoints/PVs manually seems like a large overhead. |
Is this actually available? The feature was merged in Jan 2021 and it's now December 2022 (23 months later) and there's no information about it. |
As a customer of this efs csi driver, I confirm that Dynamic provisioning via access point is available. Delete volume capability does not fully work as mentioned in the README. |
Is this a bug fix or adding new feature?
New Feature
What is this PR about? / Why do we need it?
Adds support for Dynamic Provisioning via access points. Provisions a new volume by creating an access point.
Fix for the following issues:
Fixes Implement dynamic provision support #6
Fixes Auto creation of Accesspoints #269
[EKS] [request]: EFS CSI driver automatically provision EFS directory or access point aws/containers-roadmap#891
Sample Storage class:
What testing is done?