Merge pull request #74618 from davidz627/fix/featureGates

Add feature gate check for migration at beginning of useCSIPlugin check
This commit is contained in:
Kubernetes Prow Robot 2019-02-26 19:40:26 -08:00 committed by GitHub
commit 5c528d6e40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
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) {
migratable, err := vpm.IsPluginMigratableBySpec(spec)
if err == nil && migratable {