dra scheduler: reformat code

By continuing with the next item in the if clause, the else is no longer needed
and indention can be reduced.
This commit is contained in:
Patrick Ohly
2024-01-26 10:51:35 +01:00
parent a809a6353b
commit 6cf4203751

View File

@@ -911,15 +911,16 @@ func (pl *dynamicResources) Reserve(ctx context.Context, cs *framework.CycleStat
// updating the ResourceClaim status, we assume that reserving
// will work and only do it for real during binding. If it fails at
// that time, some other pod was faster and we have to try again.
} else {
// Must be delayed allocation.
numDelayedAllocationPending++
continue
}
// Did the driver provide information that steered node
// selection towards a node that it can support?
if statusForClaim(state.podSchedulingState.schedulingCtx, pod.Spec.ResourceClaims[index].Name) != nil {
numClaimsWithStatusInfo++
}
// Must be delayed allocation.
numDelayedAllocationPending++
// Did the driver provide information that steered node
// selection towards a node that it can support?
if statusForClaim(state.podSchedulingState.schedulingCtx, pod.Spec.ResourceClaims[index].Name) != nil {
numClaimsWithStatusInfo++
}
}