Skip to content

Commit

Permalink
fix: check for nil pointer dereference (kubernetes-sigs#1763)
Browse files Browse the repository at this point in the history
  • Loading branch information
rschalo authored Oct 23, 2024
1 parent dc28b52 commit 1c22eda
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/controllers/disruption/multinodeconsolidation.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,10 @@ func filterOutSameType(newNodeClaim *scheduling.NodeClaim, consolidate []*Candid
}
// swallow the error since we don't allow min values to impact reschedulability in multi node claim
newNodeClaim, err := newNodeClaim.RemoveInstanceTypeOptionsByPriceAndMinValues(newNodeClaim.Requirements, maxPrice)
return newNodeClaim.InstanceTypeOptions, err
if err != nil {
return nil, err
}
return newNodeClaim.InstanceTypeOptions, nil
}

func (m *MultiNodeConsolidation) Reason() v1.DisruptionReason {
Expand Down

0 comments on commit 1c22eda

Please sign in to comment.