Skip to content

docs: add reason-aware repair policy matching RFC - #1

Draft
sebpalmerio wants to merge 1 commit into
mainfrom
reason-aware-repair-policy-matching-rfc
Draft

docs: add reason-aware repair policy matching RFC#1
sebpalmerio wants to merge 1 commit into
mainfrom
reason-aware-repair-policy-matching-rfc

Conversation

@sebpalmerio

@sebpalmerio sebpalmerio commented Aug 26, 2026

Copy link
Copy Markdown
Owner

Description

This PR adds a design RFC (designs/reason-aware-repair-policy-matching.md) defining reason-aware repair policy matching and eligibility for Karpenter Node Repair.

Problem

Node Repair currently maps a NodeCondition type and status to one toleration before replacing the Node. The reboot proposal adds another repair action, so diagnoses reported under the same condition may require different confidence delays, drain limits, and responses. Provider rules may also overlap and become eligible at different times. Matching must resolve those rules deterministically without relying on policy order or in-memory state.

Proposal

Extend the provider-supplied RepairPolicy with ReasonRegex and Action, then:

  • Match stable NodeCondition.reason values with Go regular expressions.
  • Require a condition-level replacement fallback for compatibility with newly introduced reasons.
  • Evaluate overlapping policies independently and merge eligible behavior using fixed action, termination grace period, and eligibility rules.
  • Derive eligibility from lastTransitionTime and reconstruct it from current API state after restart.
  • Validate the complete provider policy set before registering Node Repair.

Related RFCs

How was this change tested?

N/A — documentation/design only.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

LLMs were used in the writing of this document, but the contribution is mine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant