You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating a Machine resource there is the possibility to create the resource with an ephemerally managed Volume resource. The resulting Volume will show an ownerReference entry pointing to the created Machine resource, as well as blockOwnerDeletion set to true.
In case the Machine has to be recreated, there is currently no possibility to prevent deletion of the ephemerally managed Volume resource. This shortcoming should be tackled with the introduction of a Reclaim 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 deleted
Delete: the current behavior, the resource is garbage-collected when the managing resource has been deleted
To not break current behavior the Reclaim Policy should be defaulted to Retain if not set.
Basic example
apiVersion: compute.ironcore.dev/v1alpha1
kind: Machine
metadata:
name: machine
spec:
volumes:
- device: oda
ephemeral:
volumeTemplate:
metadata:
creationTimestamp: null
spec:
reclaimPolicy: Retain # this is the new field defining the "Retain" strategy for the corresponding volume resource
image: my-image:tag
resources:
storage: 10Gi
volumeClassRef:
name: fast
volumePoolRef:
name: pool
name: root-disk-1
This instructs the controller to not remove the Volume resource. When the managing Machine resource is deleted, the OwnerReference as well as the .spec.claimRef should be cleared.
Open questions
should the controller label the Volume resource after deletion of the managing resource as such it is no longer ephemerally 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:
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: