Closed vishwa-trulioo closed 5 months ago
From the analysis I did last week, my understanding is that the mount options for the PersistentVolume should map to CLI options - have you tried
mountOptions:
- prefix myprefix/
That is correct, the Mountpoint configurations are defined in mountOptions
(documentation for this is here)
To add to the example mentioned above:
apiVersion: v1
kind: PersistentVolume
metadata:
name: s3-pv
spec:
capacity:
storage: 1200Gi # ignored, required
accessModes:
- ReadWriteMany # supported options: ReadWriteMany / ReadOnlyMany
mountOptions:
- prefix myprefix/
csi:
driver: s3.csi.aws.com # required
volumeHandle: s3-csi-driver-volume
volumeAttributes:
bucketName: s3-csi-driver
Thanks for the support. This worked. Here is the final YAML manifest I used.
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: s3-pv
spec:
capacity:
storage: 1200Gi # ignored, required
accessModes:
- ReadWriteMany # supported options: ReadWriteMany / ReadOnlyMany
mountOptions:
- prefix myfolder/
- region us-east-1
csi:
driver: s3.csi.aws.com # required
volumeHandle: s3-csi-driver-volume
volumeAttributes:
bucketName: app-resources
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: s3-pvc
spec:
storageClassName: ""
volumeName: s3-pv
accessModes:
- ReadWriteMany
resources:
requests:
storage: 1200Gi # Adjust the size as needed
---
apiVersion: v1
kind: Pod
metadata:
name: app
spec:
containers:
- name: busybox
image: busybox
command: ["sleep", "3600"]
volumeMounts:
- name: persistent-storage
mountPath: /data
volumes:
- name: persistent-storage
persistentVolumeClaim:
claimName: s3-pvc
The link you provided for mount options. I can't seem to find the mount options in there.
Lastly, here is my final feedback to get it working.
Thank you again for the support. we can close this issue.
Thank you for the feedback. We're working to update the docs currently and will update the GitHub page once we do.
The documentation on the EKS page has been updated.
/feature
Problem statement I was attempting to specify an S3 prefix as a 'spec.csi.volumeAttributes'. Either it is not supported or not documented. I used
bucketprefix
as the parameter. It didn't workExpected outcome I checked all the examples and documentation. There is no way for us to use S3 prefix as the mount point for the 'PersistentVolume'. But, the original tool mountpoint-s3 clearly has the capability to do it.
Here is the YAML manifest I attempted,
Alternatives considered I tried different parameter names 'volumeAttributes'. But didn't work. for I had no other alternative.
Additional context If this is already possible, are you able to provide an example on how to do this?