Merge pull request #120338 from pohly/dra-helper-unsuitablenodes-fix

dra helper: skip allocated claims during UnsuitableNodes calculation
This commit is contained in:
Kubernetes Prow Robot 2023-10-09 20:32:58 +02:00 committed by GitHub
commit 2b5d2cf910
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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.
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)
if err != nil {
return nil, err