What happened:
This might not be a bug, rather intended (but misleading) behavior.
Given the following StorageClass:
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: drime-insecure
provisioner: rclone.csi.veloxpack.io
parameters:
remote: "drime-insecure"
remotePath: "rclone-20260206/insecure/${pvc.metadata.namespace}/${pvc.metadata.name}"
csi.storage.k8s.io/node-publish-secret-name: "drime-insecure"
csi.storage.k8s.io/node-publish-secret-namespace: "example"
reclaimPolicy: Delete
volumeBindingMode: Immediate
allowVolumeExpansion: true
I created a PVC and added some remote content. Upon deletion of the PVC the remote content remains, even though my reclaimPolicy is set to Delete.
What you expected to happen:
With having a reclaimPolicy: Delete - I would expect that at least the last directory in my remotePath would be deleted. (ie: rm -rf rclone-20260206/insecure/${pvc.metadata.namespace}/${pvc.metadata.name}).
note: I am aware that, in this example, this would leave some dangling empty namespace folders. However, perhaps this could be mitigated by changing the remotePath to rclone-20260206/insecure/${pvc.metadata.namespace}_${pvc.metadata.name}
How to reproduce it:
I don't have immediate access to s3, but my example was closely modeled after this example.
Deploy it, add some content to the PVC (via the pod), delete the pod/pvc or namespace, and you should find that the content still exists in the remote storage.
Anything else we need to know?:
Looking at the code this seems intentional.
However, it's unclear if there's a technical reason or simply not enough time/interest.
Environment:
- CSI Driver version: self-compiled based on your latest commit (I needed rclone v1.73.0)
- Kubernetes version (use
kubectl version): v1.34.0
- OS (e.g. from /etc/os-release): talos v1.12.2
- Kernel (e.g.
uname -a):
- Rclone version (use
rclone version): 1.73.0
- Storage backend (S3, GCS, Azure, etc.): drime
- Install tools:
- Others:
What happened:
This might not be a bug, rather intended (but misleading) behavior.
Given the following StorageClass:
I created a PVC and added some remote content. Upon deletion of the PVC the remote content remains, even though my
reclaimPolicyis set toDelete.What you expected to happen:
With having a
reclaimPolicy: Delete- I would expect that at least the last directory in my remotePath would be deleted. (ie:rm -rf rclone-20260206/insecure/${pvc.metadata.namespace}/${pvc.metadata.name}).note: I am aware that, in this example, this would leave some dangling empty namespace folders. However, perhaps this could be mitigated by changing the
remotePathtorclone-20260206/insecure/${pvc.metadata.namespace}_${pvc.metadata.name}How to reproduce it:
I don't have immediate access to s3, but my example was closely modeled after this example.
Deploy it, add some content to the PVC (via the pod), delete the pod/pvc or namespace, and you should find that the content still exists in the remote storage.
Anything else we need to know?:
Looking at the code this seems intentional.
However, it's unclear if there's a technical reason or simply not enough time/interest.
Environment:
kubectl version): v1.34.0uname -a):rclone version): 1.73.0