Fix CSI migration for vSphere volumes

Restore `migratedPlugins` entry for in-tree vSphere volumes and mark them
as migrated. Otherwise the CSI volume plugin ignores in-tree vSphere
volumes and they will never get attached / mounted by CSI migration.

The entry in `migratedPlugins` was incorrectly removed during
CSIMigrationvSphere feature gate removal.
This commit is contained in:
Jan Safranek 2023-12-14 14:07:02 +01:00
parent d19420f3ec
commit 15e0c41601

View File

@ -236,6 +236,9 @@ func (p *csiPlugin) Init(host volume.VolumeHost) error {
csitranslationplugins.AzureFileInTreePluginName: func() bool {
return utilfeature.DefaultFeatureGate.Enabled(features.CSIMigrationAzureFile)
},
csitranslationplugins.VSphereInTreePluginName: func() bool {
return true
},
csitranslationplugins.PortworxVolumePluginName: func() bool {
return utilfeature.DefaultFeatureGate.Enabled(features.CSIMigrationPortworx)
},