Fix validation options for old pvc

Also update comments on allocatedresourcestatuses fields
This commit is contained in:
Hemant Kumar
2023-07-14 12:04:27 -04:00
parent d765fa6b74
commit 137474e283
5 changed files with 70 additions and 38 deletions

View File

@@ -2046,6 +2046,10 @@ func ValidationOptionsForPersistentVolumeClaim(pvc, oldPvc *core.PersistentVolum
// If the old object allowed "ReadWriteOncePod", continue to allow it in the new object
opts.AllowReadWriteOncePod = true
}
if helper.ClaimContainsAllocatedResources(oldPvc) {
opts.EnableRecoverFromExpansionFailure = true
}
return opts
}