kubernetes-sigs/cluster-api

Trigger graceful Machine disruption via Node deletion

开放

#13,591 创建于 2026年4月17日

 (5 条评论) (0 个反应) (1 位负责人)Go (1,532 个派生)auto 404
area/machinehelp wantedkind/featurepriority/backlogtriage/accepted

仓库指标

星标
 (4,267 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

What would you like to be added (User Story)?

As an operator, I would like to be able to gracefully remove a Node and its underlying Machine/Infrastructure respecting any disruption configurations through a deletion of the Node object in the child cluster.

Detailed Description

CAPI supports a configurable and sophisticated deletion process for Machine objects that respect workload availability (PDB's, etc). At present, this is triggered through the deletion timestamp (metadata.deletionTimestamp) on the Machine object being set.

In some environments, the operator of the CAPI infrastructure differs from the operator of the child-cluster and its resources - or, jumping across clusters is cumbersome. In this model, it is challenging for a child-cluster operator to trigger this same, safe, deletion process from the child-cluster directly.

A potential solution is to (via feature flag) have CAPI configure metadata.finalizers on managed Nodes and have it react to the Node's metadata.deletionTimestamp to trigger a deletion of the parent Machine resource, removing the finalizer when the disruption process has completed. This follows a similar pattern to what karpenter has implemented and allows for safe removal of 'bad' nodes in a pinch.

Anything else you would like to add?

If there is appetite to explore this, I'm happy to put together a formal proposal/PR.

Label(s) to be applied

/kind feature /area machine

贡献者指南