Introduce a reclaim policy for ephemerally created Volume
resources
#1114
Labels
api-change
enhancement
New feature or request
later
Items that should be tracked / kept in mind and shouldn't be implemented now but later.
Summary
When creating a
Machine
resource there is the possibility to create the resource with an ephemerally managedVolume
resource. The resultingVolume
will show anownerReference
entry pointing to the createdMachine
resource, as well asblockOwnerDeletion
set totrue
.In case the
Machine
has to be recreated, there is currently no possibility to prevent deletion of the ephemerally managedVolume
resource. This shortcoming should be tackled with the introduction of aReclaim Policy
similar to Kubernetes Reclaim Policies for Persistent Volumes.The
Reclaim Policy
should support 2 modes:Retain
: the resource is not deleted after the managing resource has been deletedDelete
: the current behavior, the resource is garbage-collected when the managing resource has been deletedTo not break current behavior the
Reclaim Policy
should be defaulted toRetain
if not set.Basic example
This instructs the controller to not remove the
Volume
resource. When the managingMachine
resource is deleted, theOwnerReference
as well as the.spec.claimRef
should be cleared.Open questions
Volume
resource after deletion of the managing resource as such it is no longerephemerally managed
?Motivation
This proposed feature would make it possible to safeguard for potential data loss in case the owning
Machine
resource needs to be recreated, independent of the reason (failure, config change, ...).The text was updated successfully, but these errors were encountered: