mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-09 03:57:41 +00:00
Merge pull request #118070 from carlory/patch-001
legacy names of volume plugins have been gone a LONG time
This commit is contained in:
commit
bcb3d87117
@ -694,13 +694,11 @@ func (pm *VolumePluginMgr) FindPluginBySpec(spec *Spec) (VolumePlugin, error) {
|
|||||||
return match, nil
|
return match, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// FindPluginByName fetches a plugin by name or by legacy name. If no plugin
|
// FindPluginByName fetches a plugin by name. If no plugin is found, returns error.
|
||||||
// is found, returns error.
|
|
||||||
func (pm *VolumePluginMgr) FindPluginByName(name string) (VolumePlugin, error) {
|
func (pm *VolumePluginMgr) FindPluginByName(name string) (VolumePlugin, error) {
|
||||||
pm.mutex.RLock()
|
pm.mutex.RLock()
|
||||||
defer pm.mutex.RUnlock()
|
defer pm.mutex.RUnlock()
|
||||||
|
|
||||||
// Once we can get rid of legacy names we can reduce this to a map lookup.
|
|
||||||
var match VolumePlugin
|
var match VolumePlugin
|
||||||
if v, found := pm.plugins[name]; found {
|
if v, found := pm.plugins[name]; found {
|
||||||
match = v
|
match = v
|
||||||
|
Loading…
Reference in New Issue
Block a user