Commit b0b6fd03 authored by David Zhu's avatar David Zhu

Add feature gate check for migration at beginning of useCSIPlugin check

parent 74036c08
...@@ -1535,6 +1535,9 @@ func isDeviceOpened(deviceToDetach AttachedVolume, mounter mount.Interface) (boo ...@@ -1535,6 +1535,9 @@ func isDeviceOpened(deviceToDetach AttachedVolume, mounter mount.Interface) (boo
// TODO(dyzz): need to also add logic to check CSINodeInfo for Kubelet migration status // TODO(dyzz): need to also add logic to check CSINodeInfo for Kubelet migration status
func useCSIPlugin(vpm *volume.VolumePluginMgr, spec *volume.Spec) bool { func useCSIPlugin(vpm *volume.VolumePluginMgr, spec *volume.Spec) bool {
if !utilfeature.DefaultFeatureGate.Enabled(features.CSIMigration) {
return false
}
if csilib.IsPVMigratable(spec.PersistentVolume) || csilib.IsInlineMigratable(spec.Volume) { if csilib.IsPVMigratable(spec.PersistentVolume) || csilib.IsInlineMigratable(spec.Volume) {
migratable, err := vpm.IsPluginMigratableBySpec(spec) migratable, err := vpm.IsPluginMigratableBySpec(spec)
if err == nil && migratable { if err == nil && migratable {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment