mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-08 11:38:15 +00:00
Merge pull request #120925 from bzsuni/cleanup/sets/scheduler
use generic sets in scheduler
This commit is contained in:
commit
b74e286dc9
@ -113,7 +113,7 @@ func mergePluginSet(logger klog.Logger, defaultPluginSet, customPluginSet v1.Plu
|
||||
disabledPlugins := sets.New[string]()
|
||||
enabledCustomPlugins := make(map[string]pluginIndex)
|
||||
// replacedPluginIndex is a set of index of plugins, which have replaced the default plugins.
|
||||
replacedPluginIndex := sets.NewInt()
|
||||
replacedPluginIndex := sets.New[int]()
|
||||
var disabled []v1.Plugin
|
||||
for _, disabledPlugin := range customPluginSet.Disabled {
|
||||
// if the user is manually disabling any (or all, with "*") default plugins for an extension point,
|
||||
|
@ -75,7 +75,7 @@ type stateData struct {
|
||||
//
|
||||
// Set in parallel during Filter, so write access there must be
|
||||
// protected by the mutex. Used by PostFilter.
|
||||
unavailableClaims sets.Int
|
||||
unavailableClaims sets.Set[int]
|
||||
|
||||
// podSchedulingState keeps track of the PodSchedulingContext
|
||||
// (if one exists) and the changes made to it.
|
||||
@ -713,7 +713,7 @@ func (pl *dynamicResources) Filter(ctx context.Context, cs *framework.CycleState
|
||||
state.mutex.Lock()
|
||||
defer state.mutex.Unlock()
|
||||
if state.unavailableClaims == nil {
|
||||
state.unavailableClaims = sets.NewInt()
|
||||
state.unavailableClaims = sets.New[int]()
|
||||
}
|
||||
|
||||
for index := range unavailableClaims {
|
||||
|
Loading…
Reference in New Issue
Block a user