remove CheckMigrationFeatureFlags

Signed-off-by: carlory <baofa.fan@daocloud.io>
This commit is contained in:
carlory
2025-11-13 11:48:40 +08:00
parent be0e68ba84
commit dc12e00fd2

View File

@@ -21,7 +21,6 @@ import (
"fmt"
v1 "k8s.io/api/core/v1"
"k8s.io/component-base/featuregate"
csilibplugins "k8s.io/csi-translation-lib/plugins"
"k8s.io/klog/v2"
"k8s.io/kubernetes/pkg/volume"
@@ -149,15 +148,3 @@ func TranslateInTreeSpecToCSI(logger klog.Logger, spec *volume.Spec, podNamespac
InlineVolumeSpecForCSIMigration: inlineVolume,
}, nil
}
// CheckMigrationFeatureFlags checks the configuration of feature flags related
// to CSI Migration is valid. It will return whether the migration is complete
// by looking up the pluginUnregister flag
func CheckMigrationFeatureFlags(f featuregate.FeatureGate, pluginMigration,
pluginUnregister featuregate.Feature) (migrationComplete bool, err error) {
// This is for in-tree plugin that get migration finished
if f.Enabled(pluginMigration) && f.Enabled(pluginUnregister) {
return true, nil
}
return false, nil
}