plugins

package
v0.0.0-...-6e91e84 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AWSEBSDriverName       = "ebs.csi.aws.com"
	AWSEBSInTreePluginName = "kubernetes.io/aws-ebs"
)
View Source
const (
	// GCE PD CSI driver constants
	GCEPDDriverName       = "pd.csi.storage.gke.io"
	GCEPDInTreePluginName = "kubernetes.io/gce-pd"

	UnspecifiedValue = "UNSPECIFIED"

	// Kubernetes label constants
	LabelZoneFailureDomain  = "failure-domain.beta.kubernetes.io/zone"
	LabelMultiZoneDelimiter = "__"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSEBS

type AWSEBS struct{}

func (*AWSEBS) CanSupport

func (t *AWSEBS) CanSupport(pv *v1.PersistentVolume) bool

CanSupport tests whether the plugin supports a given volume specification from the API. The spec pointer should be considered const.

func (*AWSEBS) GetInTreePluginName

func (t *AWSEBS) GetInTreePluginName() string

func (*AWSEBS) TranslateCSIPVToInTree

func (t *AWSEBS) TranslateCSIPVToInTree(pv *v1.PersistentVolume) (*v1.PersistentVolume, error)

TranslateToIntree takes a CSIPersistentVolumeSource and will translate it to a volume.Spec for the specific in-tree volume specified by `inTreePlugin`, if that translation logic has been implemented

func (*AWSEBS) TranslateInTreePVToCSI

func (t *AWSEBS) TranslateInTreePVToCSI(pv *v1.PersistentVolume) (*v1.PersistentVolume, error)

TranslateToCSI takes a volume.Spec and will translate it to a CSIPersistentVolumeSource if the translation logic for that specific in-tree volume spec has been implemented

type GCEPD

type GCEPD struct{}

func (*GCEPD) CanSupport

func (g *GCEPD) CanSupport(pv *v1.PersistentVolume) bool

CanSupport tests whether the plugin supports a given volume specification from the API. The spec pointer should be considered const.

func (*GCEPD) GetInTreePluginName

func (g *GCEPD) GetInTreePluginName() string

func (*GCEPD) TranslateCSIPVToInTree

func (g *GCEPD) TranslateCSIPVToInTree(pv *v1.PersistentVolume) (*v1.PersistentVolume, error)

TranslateToIntree takes a CSIPersistentVolumeSource and will translate it to a volume.Spec for the specific in-tree volume specified by `inTreePlugin`, if that translation logic has been implemented

func (*GCEPD) TranslateInTreePVToCSI

func (g *GCEPD) TranslateInTreePVToCSI(pv *v1.PersistentVolume) (*v1.PersistentVolume, error)

TranslateToCSI takes a volume.Spec and will translate it to a CSIPersistentVolumeSource if the translation logic for that specific in-tree volume spec has been implemented

type InTreePlugin

type InTreePlugin interface {
	// TranslateToCSI takes a persistent volume and will translate
	// the in-tree source to a CSI Source. The input persistent volume can be modified
	TranslateInTreePVToCSI(pv *v1.PersistentVolume) (*v1.PersistentVolume, error)

	// TranslateToIntree takes a PV with a CSI PersistentVolume Source and will translate
	// it to a in-tree Persistent Volume Source for the in-tree volume
	// by the `Driver` field in the CSI Source. The input PV object can be modified
	TranslateCSIPVToInTree(pv *v1.PersistentVolume) (*v1.PersistentVolume, error)

	// CanSupport tests whether the plugin supports a given volume
	// specification from the API.
	CanSupport(pv *v1.PersistentVolume) bool

	// GetInTreePluginName returns the in-tree plugin name this migrates
	GetInTreePluginName() string
}

Jump to

Keyboard shortcuts

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