Use the generic Set in scheduler

This commit is contained in:
sarab
2023-03-27 13:16:13 +05:30
parent 8f15859afc
commit 8d18ae6fc2
50 changed files with 348 additions and 346 deletions

View File

@@ -68,13 +68,13 @@ func isCSIMigrationOn(csiNode *storagev1.CSINode, pluginName string) bool {
return false
}
var mpaSet sets.String
var mpaSet sets.Set[string]
mpa := csiNodeAnn[v1.MigratedPluginsAnnotationKey]
if len(mpa) == 0 {
mpaSet = sets.NewString()
mpaSet = sets.New[string]()
} else {
tok := strings.Split(mpa, ",")
mpaSet = sets.NewString(tok...)
mpaSet = sets.New(tok...)
}
return mpaSet.Has(pluginName)