Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckMigrationFeatureFlags ¶
func CheckMigrationFeatureFlags(f featuregate.FeatureGate, pluginMigration, pluginMigrationComplete featuregate.Feature) error
CheckMigrationFeatureFlags checks the configuration of feature flags related to CSI Migration is valid
func TranslateInTreeSpecToCSI ¶
func TranslateInTreeSpecToCSI(spec *volume.Spec, translator InTreeToCSITranslator) (*volume.Spec, error)
TranslateInTreeSpecToCSI translates a volume spec (either PV or inline volume) supported by an in-tree plugin to CSI
Types ¶
type InTreeToCSITranslator ¶
type InTreeToCSITranslator interface { TranslateInTreePVToCSI(pv *v1.PersistentVolume) (*v1.PersistentVolume, error) TranslateInTreeInlineVolumeToCSI(volume *v1.Volume) (*v1.PersistentVolume, error) }
InTreeToCSITranslator performs translation of Volume sources for PV and Volume objects from references to in-tree plugins to migrated CSI plugins
type PluginManager ¶
type PluginManager struct {
PluginNameMapper
}
PluginManager keeps track of migrated state of in-tree plugins
func NewPluginManager ¶
func NewPluginManager(m PluginNameMapper) PluginManager
NewPluginManager returns a new PluginManager instance
func (PluginManager) IsMigratable ¶
func (pm PluginManager) IsMigratable(spec *volume.Spec) (bool, error)
IsMigratable indicates whether CSI migration has been enabled for a volume plugin that the spec refers to
func (PluginManager) IsMigrationCompleteForPlugin ¶
func (pm PluginManager) IsMigrationCompleteForPlugin(pluginName string) bool
IsMigrationCompleteForPlugin indicates whether CSI migration has been completed for a particular storage plugin
func (PluginManager) IsMigrationEnabledForPlugin ¶
func (pm PluginManager) IsMigrationEnabledForPlugin(pluginName string) bool
IsMigrationEnabledForPlugin indicates whether CSI migration has been enabled for a particular storage plugin
type PluginNameMapper ¶
type PluginNameMapper interface { GetInTreePluginNameFromSpec(pv *v1.PersistentVolume, vol *v1.Volume) (string, error) GetCSINameFromInTreeName(pluginName string) (string, error) }
PluginNameMapper contains utility methods to retrieve names of plugins that support a spec, map intree <=> migrated CSI plugin names, etc