awslabs / mountpoint-s3-csi-driver

Built on Mountpoint for Amazon S3, the Mountpoint CSI driver presents an Amazon S3 bucket as a storage volume accessible by containers in your Kubernetes cluster.
Apache License 2.0
214 stars 26 forks source link

Feature Request: Specify Bucket Name Inside StorageClass for S3 CSI Driver #250

Open matanbaruch opened 2 months ago

matanbaruch commented 2 months ago

Is your feature request related to a problem? Please describe. Currently, when using the S3 CSI driver, there is no option to specify a bucket name directly within the StorageClass configuration. This can make it challenging to manage multiple PV's needs, as it requires additional inputs and steps or external automation to handle bucket association to a PV. For applications or services that rely on dynamic PV provisioning, this limitation introduces complexity and overhead.

Describe the solution you'd like in detail I would like the ability to specify the bucket name directly in the StorageClass configuration. This would allow users to seamlessly get the right bucket. The configuration could look like:

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: s3-bucket-storage
provisioner: s3.csi.aws.com
parameters:
  bucketName: my-custom-bucket

The S3 CSI driver would limit all of the PV's created by this StorageClass to be on specific bucket.

Describe alternatives you've considered

Additional context This feature would enhance the usability of the S3 CSI driver for Kubernetes users, particularly in environments that require dynamic storage provisioning for multiple services or tenants. Having this feature built into the StorageClass simplifies both the developer and operations workflows, making it easier to scale and manage storage needs.

unexge commented 2 months ago

Thanks for the feature request @matanbaruch. We have a tracking ticket for dynamic provisioning https://github.com/awslabs/mountpoint-s3-csi-driver/issues/125. Would you need anything on top of dynamic provisioning to help with your use-case? If not, I'd suggest adding 👍 on that issue to show your interest on the feature.

matanbaruch commented 2 months ago

@unexge Will this one support StatefulSet? or Statefulset ReadWriteMany?

unexge commented 2 months ago

@matanbaruch, we haven't done the design work yet, so we can't guarantee anything. But using volumes in StatefulSets should work today, and we support ReadWriteMany and ReadOnlyMany access modes, so we'd probably keep supporting these with dynamic provisioning as well unless we find some problems with it.

matanbaruch commented 2 months ago

I tried using it, but since it create a PVC for every pod, it's not supported. ReadWriteMany only support 1 PVC per PV

If you are able to use StatefulSet I'd love to see that.

kar0t commented 2 months ago

+1

muddyfish commented 2 months ago

Please upvote this feature request with 👍 (or the dynamic provisioning request) to help the team gauge interest in this feature - we can't aggregate based on comments