How to categorize this issue?
/area control-plane
/kind enhancement
What would you like to be added:
As an operator, I would like to have the ability to perform some actions after the draining of the node and before the deletion of the VM. For example, in a self-hosted control plane whose VMs are managed by MCM, there should be a mechanism to remove the etcd member associated with the VM from the etcd cluster before MCM deletes the VM as part of replacement/rolling updates.
Proposed changes:
- A phase in the Machine lifecycle to signify to external actors that the drain is complete and that it is safe to perform the out-of-band operations necessary before termination of the VM. Suggestion: a
WaitingForPreTerminationHooks phase.
- An annotation, whose absence could be used by MCM as a signal to proceed with the termination of the VM. Suggestion:
pre-terminate.delete.hook.machine.sapcloud.io/<name>=true where <name> is set by the external actor for identification. So, once the external actor is done with the actions (like removal of the etcd member), it will delete the annotation from the Machine object, after which MCM can continue with the deletion flow. This annotation shall be set by the external actor as part of the MachineTemplate while creating the MachineDeployment.
Tasks:
Why is this needed:
Part of gardener/gardener#15298
How to categorize this issue?
/area control-plane
/kind enhancement
What would you like to be added:
As an operator, I would like to have the ability to perform some actions after the draining of the node and before the deletion of the VM. For example, in a self-hosted control plane whose VMs are managed by MCM, there should be a mechanism to remove the etcd member associated with the VM from the etcd cluster before MCM deletes the VM as part of replacement/rolling updates.
Proposed changes:
WaitingForPreTerminationHooksphase.pre-terminate.delete.hook.machine.sapcloud.io/<name>=truewhere<name>is set by the external actor for identification. So, once the external actor is done with the actions (like removal of the etcd member), it will delete the annotation from the Machine object, after which MCM can continue with the deletion flow. This annotation shall be set by the external actor as part of theMachineTemplatewhile creating theMachineDeployment.Tasks:
Why is this needed:
Part of gardener/gardener#15298