Merge pull request #120925 from bzsuni/cleanup/sets/scheduler

use generic sets in scheduler
This commit is contained in:
Kubernetes Prow Robot 2023-10-07 19:07:31 +02:00 committed by GitHub
commit b74e286dc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -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,

View File

@ -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 {