Skip to content

Tag consolidation events with controller name#5

Open
jamesmt-aws wants to merge 1 commit intomainfrom
k1-tag-consolidation-events
Open

Tag consolidation events with controller name#5
jamesmt-aws wants to merge 1 commit intomainfrom
k1-tag-consolidation-events

Conversation

@jamesmt-aws
Copy link
Copy Markdown
Owner

Summary

  • Prefix Unconsolidatable, ConsolidationCandidate, and ConsolidationRejected event messages with the consolidation type (single or multi)
  • Users seeing "Can't replace with a cheaper node" can now tell which evaluator produced the message
  • Adds consolidationType parameter to computeConsolidation(), computeSpotToSpotConsolidation(), EmitCandidateEvents(), and EmitRejectedEvents()

Motivation

In kubernetes-sigs/karpenter#1962, multi-node consolidation was silently skipped due to budget arithmetic. The user saw "Can't replace with a cheaper node" from single-node consolidation and reasonably assumed multi-node had tried and failed. Prefixing events with the controller name makes the diagnosis immediate.

Test plan

  • Verify events on NodeClaim include controller name prefix (e.g., single: Can't replace with a cheaper node)
  • Verify ConsolidationCandidate events include prefix
  • Verify ConsolidationRejected events include prefix
  • No behavior change beyond event message formatting

@jamesmt-aws jamesmt-aws force-pushed the k1-tag-consolidation-events branch 2 times, most recently from 96fc17b to dae4d70 Compare March 23, 2026 07:16
Store consolidationType on the consolidation base struct, set it in
NewSingleNodeConsolidation and NewMultiNodeConsolidation. Prefix
Unconsolidatable, ConsolidationCandidate, and ConsolidationRejected
event messages with the consolidation type. Store ConsolidationLabel
on Command for candidate and rejected events.

Users seeing "Can't replace with a cheaper node" can now tell which
evaluator produced the message.

Ref: kubernetes-sigs#1962
@jamesmt-aws jamesmt-aws force-pushed the k1-tag-consolidation-events branch from dae4d70 to aad516b Compare March 23, 2026 07:18
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.

2 participants