mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-29 13:24:42 +00:00
change pluginsNeeded returned value to sets.String
Signed-off-by: kerthcet <kerthcet@gmail.com>
This commit is contained in:
parent
108c284a33
commit
47463d777a
@ -1259,25 +1259,26 @@ func (f *frameworkImpl) SharedInformerFactory() informers.SharedInformerFactory
|
|||||||
return f.informerFactory
|
return f.informerFactory
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *frameworkImpl) pluginsNeeded(plugins *config.Plugins) map[string]config.Plugin {
|
func (f *frameworkImpl) pluginsNeeded(plugins *config.Plugins) sets.String {
|
||||||
pgMap := make(map[string]config.Plugin)
|
pgSet := sets.String{}
|
||||||
|
|
||||||
if plugins == nil {
|
if plugins == nil {
|
||||||
return pgMap
|
return pgSet
|
||||||
}
|
}
|
||||||
|
|
||||||
find := func(pgs *config.PluginSet) {
|
find := func(pgs *config.PluginSet) {
|
||||||
for _, pg := range pgs.Enabled {
|
for _, pg := range pgs.Enabled {
|
||||||
pgMap[pg.Name] = pg
|
pgSet.Insert(pg.Name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, e := range f.getExtensionPoints(plugins) {
|
for _, e := range f.getExtensionPoints(plugins) {
|
||||||
find(e.plugins)
|
find(e.plugins)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Parse MultiPoint separately since they are not returned by f.getExtensionPoints()
|
// Parse MultiPoint separately since they are not returned by f.getExtensionPoints()
|
||||||
find(&plugins.MultiPoint)
|
find(&plugins.MultiPoint)
|
||||||
return pgMap
|
|
||||||
|
return pgSet
|
||||||
}
|
}
|
||||||
|
|
||||||
// ProfileName returns the profile name associated to this framework.
|
// ProfileName returns the profile name associated to this framework.
|
||||||
|
Loading…
Reference in New Issue
Block a user