kubernetes-sigs/cluster-api

Add maxRetry to RemediationStrategy in Machinedeployment

開放

#12,553 建立於 2025年7月30日

 (19 則留言) (2 個反應) (0 位負責人)Go (1,532 個分叉)auto 404
help wantedkind/featurepriority/backlogtriage/accepted

倉庫指標

星標
 (4,267 顆星)
PR 合併指標
 (平均合併 3天 1小時) (30 天內合併 114 個 PR)

描述

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

Currently, Cluster API's KubeadmControlPlane (KCP) supports a remediationStrategy.maxretry field to control the number of times remediation is attempted before giving up. However, MachineDeployment lacks a similar capability.

Detailed Description

Proposal: Introduce a maxRetry field under MachineDeployment.spec.strategy.remediation that integrates with MachineHealthCheck. This field would define the maximum number of remediation attempts allowed for unhealthy machines associated with a MachineDeployment.

Use Case: In environments where aggressive or infinite remediation can lead to cascading failures or unnecessary resource churn, a retry limit helps provide guardrails for self-healing behaviour. Once maxRetry is reached, remediation would stop, and external signals (e.g., human intervention or alerting) can be relied upon.

Benefits:

  • Parity with KubeadmControlPlane's remediationStrategy.maxRetry.
  • Safer self-healing with better operational control.
  • Prevents runaway remediation loops in edge scenarios.
spec:
  strategy:
    remediation:
      maxRetry: <int>

Anything else you would like to add?

No response

Label(s) to be applied

/kind feature One or more /area label. See https://github.com/kubernetes-sigs/cluster-api/labels?q=area for the list of labels.

貢獻者指南