csimigration

package
v1.19.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2020 License: Apache-2.0 Imports: 8 Imported by: 18

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL