[x] Automated tests added to cover the changes. If tests couldn't be added, an explanation is provided in the Verification and Testing section
[x] Changes to user-facing functionality, API, CLI, and upgrade impacts are clearly called out in PR description
[x] PR has at least two approvals before merging (or a reasonable exception, like it's just a docs change)
Previously, we have set PV/PVC's claimpolicy to retain to intentionally keep PV around when user has deleted their app. This is to avoid PV gets deleted when PVC is deleted. However this exposes a problem that when the volume/PV is deleted from acorn, the underlying storage resource is not cleaned up because of retain policy. So, when acorn initialize a delete call, we tweak the PV's reclaim policy to be delete before we actually delete the resource. This makes sure the driver will clean up the PV and underlying storage resource.
The downside of this fix, is that we will switch every PV's claimpolicy to delete regardless of what it has been actually configured in the cluster, if you delete PV through acorn api.
Checklist
This is a title (#1216)
. Here's an examplePreviously, we have set PV/PVC's claimpolicy to
retain
to intentionally keep PV around when user has deleted their app. This is to avoid PV gets deleted when PVC is deleted. However this exposes a problem that when the volume/PV is deleted from acorn, the underlying storage resource is not cleaned up because ofretain
policy. So, when acorn initialize a delete call, we tweak the PV's reclaim policy to bedelete
before we actually delete the resource. This makes sure the driver will clean up the PV and underlying storage resource.The downside of this fix, is that we will switch every PV's claimpolicy to
delete
regardless of what it has been actually configured in the cluster, if you delete PV through acorn api.https://github.com/acorn-io/manager/issues/1764