Open leoryu opened 2 months ago
This issue is currently awaiting triage.
If Karpenter contributors determines this is a relevant issue, they will accept it by applying the triage/accepted
label and provide further guidance.
The triage/accepted
label can be added by org members by writing /triage accepted
in a comment.
@njtran Hi, I found the code is commit by you 2 yeases ago. Could you explain why nodeclaim is always spot
in consolidation? Since the real world spot
machine might not be available, I think karpenter should choose the cheapeast one, even the machine is on-demand
.
Description
Observed Behavior:
From :
https://github.com/kubernetes-sigs/karpenter/blob/372b9c82eeb86efd7bbb1bbba0b55f230ab65c98/pkg/controllers/disruption/consolidation.go#L192-L205
Karpenter will set nodeclaim's
CapacityType
withspot
if reqs allowCapacityType
with[OD, spot]
.This logic will let karpenter always creates
spot
machine, even the cheapest machine isOD
but not thespot
one.And the worst case is that there is no
spot
machine avaliabel, the karpenter wiill report err:Since the created nodeclaim has reqs with 'spot', the consolidation will not sucess even we have cheaper
OD
machine.Expected Behavior:
What I expected in consolidation is that:
Do not modify the
CapacityType
, just choose the chpeast machine if my reqs has ignore the capacity type.