mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
DRA scheduler: code cleanup
Comment fix and removal of `skippedUnknownDevice`. That field was originally meant to somehow influence how a failure to allocate gets reported, but in the end that distinction was not implemented.
This commit is contained in:
parent
6dffee6534
commit
c1ec1dce75
@ -68,7 +68,7 @@ func NewAllocator(ctx context.Context,
|
||||
}, nil
|
||||
}
|
||||
|
||||
// ClaimsToAllocate returns the claims that the allocated was created for.
|
||||
// ClaimsToAllocate returns the claims that the allocator was created for.
|
||||
func (a *Allocator) ClaimsToAllocate() []*resourceapi.ResourceClaim {
|
||||
return a.claimsToAllocate
|
||||
}
|
||||
@ -354,7 +354,6 @@ type allocator struct {
|
||||
constraints [][]constraint // one list of constraints per claim
|
||||
requestData map[requestIndices]requestData // one entry per request
|
||||
allocated map[DeviceID]bool
|
||||
skippedUnknownDevice bool
|
||||
result []*resourceapi.AllocationResult
|
||||
}
|
||||
|
||||
@ -620,9 +619,6 @@ func (alloc *allocator) isSelectable(r requestIndices, slice *resourceapi.Resour
|
||||
device := slice.Spec.Devices[deviceIndex].Basic
|
||||
if device == nil {
|
||||
// Must be some future, unknown device type. We cannot select it.
|
||||
// If we don't find anything else, then this will get reported
|
||||
// in the final result, so remember that we skipped some device.
|
||||
alloc.skippedUnknownDevice = true
|
||||
return false, nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user