Skip to content
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

StorageClass reclaimPolicy vs onDelete vs archiveOnDelete #363

Open
jinhee6930 opened this issue Mar 7, 2025 · 0 comments
Open

StorageClass reclaimPolicy vs onDelete vs archiveOnDelete #363

jinhee6930 opened this issue Mar 7, 2025 · 0 comments

Comments

@jinhee6930
Copy link

Hi, I have some question.
I understood that reclaimPolicy and onDelete define the same behavior.

▶ onDelete Description
(https://github.com/kubernetes-sigs/nfs-subdir-external-provisioner)
If it exists and has a delete value, delete the directory, if it exists and has a retain value, save the directory.

▶ StorageClass reclaimPolicy Description
(https://kubernetes.io/docs/concepts/storage/storage-classes/#reclaim-policy)
PersistentVolumes that are dynamically created by a StorageClass will have the reclaim policy specified in the reclaimPolicy field of the class, which can be either Delete or Retain.

▶ PV reclaimPolicy Description
(https://kubernetes.io/docs/concepts/storage/persistent-volumes/#reclaiming)
Retain: The Retain reclaim policy allows for manual reclamation of the resource. When the PersistentVolumeClaim is deleted, the PersistentVolume still exists and the volume is considered "released".
Delete: For volume plugins that support the Delete reclaim policy, deletion removes both the PersistentVolume object from Kubernetes, as well as the associated storage asset in the external infrastructure.

▶ Questions
Q1. Do reclaimPolicy and onDelete mean the same thing?
Q2. What happens if StorageClass's reclaimPolicy=Delete, onDelete=retain, or reclaimPolicy=Retain, onDelete=delete? Is there a priority between reclaimPolicy and onDelete?
Q3. I ran an archiveOnDelete test. When reclaimPolicy=Retain, the archived- directory was not created regardless of whether archiveOnDelete was true or false. Does archiveOnDelete only have meaning when reclaimPolicy=Delete?

If I misunderstood anything, please let me know.
Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant