You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 1, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Sep 1, 2026. It is now read-only.
Support PersistentVolumeClaimRetentionPolicy for statefulsets #208
As of Kubernetes v1.32PersistentVolumeClaimRetention policy is enabled by default for statefulsets and is behind a feature gate for v1.31. This feature provides a K8s native way to manage orphaned PVCs, that is pretty similar to the existing deleteOrphanPvc config in the Druid CRD. By using this policy, we can control how orphaned PVCs will be treated:
+1. Makes sense to use persistentVolumeClaimRetention. What do I have to do to use the > v.1.30 API? - You can just test with > v.1.30 . Its just that the last release was tested on v.1.30. The underlying client libraries should work.
How do you plan to add this ? similar to deleteOrphanPvc flag in nodeSpec ? Also what is the default behavior of statefulset, do we need to enable this flag explicitly ?
@AdheipSingh this is a critical issue for users on kubernetes > = 1.32.x. The flag deleteOrphanPvc is not being honored because the default value of STS persistentVolumeClaimRetentionPolicy is Retain.
Perhaps I'm wrong, but it makes sense to drop support for the flag deleteOrphanPvc to adopt k8s native handling of orphan PVCs, which also has finer-grained control for deletion of orphan PVCs.
Yes i agree, deleteOrphan logic was written way before when sts din't support this. We should adhere to STS feature and just expose the persistentVolumeClaimRetentionPolicy within the spec.
Activity
AdheipSingh commentedon Mar 3, 2025
+1. Makes sense to use
persistentVolumeClaimRetention.What do I have to do to use the > v.1.30 API?- You can just test with > v.1.30 . Its just that the last release was tested on v.1.30. The underlying client libraries should work.How do you plan to add this ? similar to deleteOrphanPvc flag in nodeSpec ? Also what is the default behavior of statefulset, do we need to enable this flag explicitly ?
layoaster commentedon Apr 9, 2026
@SatyaKuppam, thanks for raising this issue.
@AdheipSingh this is a critical issue for users on kubernetes > = 1.32.x. The flag
deleteOrphanPvcis not being honored because the default value of STSpersistentVolumeClaimRetentionPolicyisRetain.Perhaps I'm wrong, but it makes sense to drop support for the flag
deleteOrphanPvcto adopt k8s native handling of orphan PVCs, which also has finer-grained control for deletion of orphan PVCs.AdheipSingh commentedon Apr 9, 2026
Yes i agree, deleteOrphan logic was written way before when sts din't support this. We should adhere to STS feature and just expose the persistentVolumeClaimRetentionPolicy within the spec.