Documentation ¶
Index ¶
Constants ¶
const ( // AWSEBSDriverName is the name of the CSI driver for EBS AWSEBSDriverName = "ebs.csi.aws.com" // AWSEBSInTreePluginName is the name of the intree plugin for EBS AWSEBSInTreePluginName = "kubernetes.io/aws-ebs" )
const ( // GCEPDDriverName is the name of the CSI driver for GCE PD GCEPDDriverName = "pd.csi.storage.gke.io" // GCEPDInTreePluginName is the name of the intree plugin for GCE PD GCEPDInTreePluginName = "kubernetes.io/gce-pd" // LabelZoneFailureDomain is the label on PVs indicating the zone they are provisioned in LabelZoneFailureDomain = "failure-domain.beta.kubernetes.io/zone" // LabelMultiZoneDelimiter separates zones for RePD volumes LabelMultiZoneDelimiter = "__" // UnspecifiedValue is used for an unknown zone string UnspecifiedValue = "UNSPECIFIED" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AWSEBS ¶
type AWSEBS struct{}
AWSEBS handles translation of PV spec from In-tree EBS to CSI EBS and vice versa
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 ¶
GetInTreePluginName returns the name of the intree plugin driver
func (*AWSEBS) TranslateCSIPVToInTree ¶
func (t *AWSEBS) TranslateCSIPVToInTree(pv *v1.PersistentVolume) (*v1.PersistentVolume, error)
TranslateCSIPVToInTree takes a PV with CSIPersistentVolumeSource set and translates the EBS CSI source to a AWSElasticBlockStore source.
func (*AWSEBS) TranslateInTreePVToCSI ¶
func (t *AWSEBS) TranslateInTreePVToCSI(pv *v1.PersistentVolume) (*v1.PersistentVolume, error)
TranslateInTreePVToCSI takes a PV with AWSElasticBlockStore set from in-tree and converts the AWSElasticBlockStore source to a CSIPersistentVolumeSource
type GCEPD ¶
type GCEPD struct{}
GCEPD handles translation of PV spec from In-tree GCE PD to CSI GCE PD and vice versa
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 ¶
GetInTreePluginName returns the name of the intree plugin driver
func (*GCEPD) TranslateCSIPVToInTree ¶
func (g *GCEPD) TranslateCSIPVToInTree(pv *v1.PersistentVolume) (*v1.PersistentVolume, error)
TranslateCSIPVToInTree takes a PV with CSIPersistentVolumeSource set and translates the GCE PD CSI source to a GCEPersistentDisk source.
func (*GCEPD) TranslateInTreePVToCSI ¶
func (g *GCEPD) TranslateInTreePVToCSI(pv *v1.PersistentVolume) (*v1.PersistentVolume, error)
TranslateInTreePVToCSI takes a PV with GCEPersistentDisk set from in-tree and converts the GCEPersistentDisk source to a CSIPersistentVolumeSource
type InTreePlugin ¶
type InTreePlugin interface { // TranslateInTreePVToCSI 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) // TranslateCSIPVToInTree 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 }
InTreePlugin handles translations between CSI and in-tree sources in a PV