mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 17:30:00 +00:00
Merge pull request #120338 from pohly/dra-helper-unsuitablenodes-fix
dra helper: skip allocated claims during UnsuitableNodes calculation
This commit is contained in:
commit
2b5d2cf910
@ -667,6 +667,11 @@ func (ctrl *controller) checkPodClaim(ctx context.Context, pod *v1.Pod, podClaim
|
|||||||
// Nothing to do for it as part of pod scheduling.
|
// Nothing to do for it as part of pod scheduling.
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
|
if claim.Status.Allocation != nil {
|
||||||
|
// Already allocated, class and parameter are not needed and nothing
|
||||||
|
// need to be done for the claim either.
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
class, err := ctrl.rcLister.Get(claim.Spec.ResourceClassName)
|
class, err := ctrl.rcLister.Get(claim.Spec.ResourceClassName)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
Loading…
Reference in New Issue
Block a user