manager: change default delete policy to Retain for PV creation
For manually created PV and PVC, Kubernetes doesn't know the related volume
plugin(provisioner). Hence setting 'persistentVolumeReclaimPolicy'to Delete for
PV auto deletion doesn't work.
issue 544
@@ -88,7 +88,7 @@ func NewPVManifest(v *longhorn.Volume, pvName, storageClassName string) *apiv1.P
apiv1.ReadWriteOnce,
},
- PersistentVolumeReclaimPolicy: apiv1.PersistentVolumeReclaimDelete,
+ PersistentVolumeReclaimPolicy: apiv1.PersistentVolumeReclaimRetain,
VolumeMode: &pvVolumeMode,
