PV controller changes to support PV Deletion protection finalizer
Signed-off-by: Deepak Kinni <dkinni@vmware.com>
This commit is contained in:
@@ -370,6 +370,15 @@ func withVolumeDeletionTimestamp(pvs []*v1.PersistentVolume) []*v1.PersistentVol
|
||||
return result
|
||||
}
|
||||
|
||||
func volumesWithFinalizers(pvs []*v1.PersistentVolume, finalizers []string) []*v1.PersistentVolume {
|
||||
result := []*v1.PersistentVolume{}
|
||||
for _, pv := range pvs {
|
||||
pv.SetFinalizers(finalizers)
|
||||
result = append(result, pv)
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
// newClaim returns a new claim with given attributes
|
||||
func newClaim(name, claimUID, capacity, boundToVolume string, phase v1.PersistentVolumeClaimPhase, class *string, annotations ...string) *v1.PersistentVolumeClaim {
|
||||
fs := v1.PersistentVolumeFilesystem
|
||||
|
Reference in New Issue
Block a user