mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-07-17 11:28:58 +00:00
remove CheckMigrationFeatureFlags
Signed-off-by: carlory <baofa.fan@daocloud.io>
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user