Documentation ¶
Index ¶
Constants ¶
View Source
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" )
View Source
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" // UnspecifiedValue is used for an unknown zone string UnspecifiedValue = "UNSPECIFIED" )
View Source
const ( // CinderDriverName is the name of the CSI driver for Cinder CinderDriverName = "cinder.csi.openstack.org" // CinderInTreePluginName is the name of the intree plugin for Cinder CinderInTreePluginName = "kubernetes.io/cinder" )
Variables ¶
This section is empty.
Functions ¶
func KubernetesVolumeIDToEBSVolumeID ¶
KubernetesVolumeIDToEBSVolumeID translates Kubernetes volume ID to EBS volume ID KubernetsVolumeID forms:
- aws://<zone>/<awsVolumeId>
- aws:///<awsVolumeId>
- <awsVolumeId>
EBS Volume ID form:
- vol-<alphanumberic>
This translation shouldn't be needed and should be fixed in long run See https://github.com/kubernetes/kubernetes/issues/73730
Types ¶
type InTreePlugin ¶
type InTreePlugin interface { // TranslateInTreeStorageClassParametersToCSI takes in-tree storage class // parameters and translates them to a set of parameters consumable by CSI plugin TranslateInTreeStorageClassParametersToCSI(scParameters map[string]string) (map[string]string, error) // 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 // GetCSIPluginName returns the name of the CSI plugin that supersedes the in-tree plugin GetCSIPluginName() string }
InTreePlugin handles translations between CSI and in-tree sources in a PV
func NewAWSElasticBlockStoreCSITranslator ¶
func NewAWSElasticBlockStoreCSITranslator() InTreePlugin
NewAWSElasticBlockStoreCSITranslator returns a new instance of awsElasticBlockStoreTranslator
func NewGCEPersistentDiskCSITranslator ¶
func NewGCEPersistentDiskCSITranslator() InTreePlugin
NewGCEPersistentDiskCSITranslator returns a new instance of gcePersistentDiskTranslator
func NewOpenStackCinderCSITranslator ¶
func NewOpenStackCinderCSITranslator() InTreePlugin
NewOpenStackCinderCSITranslator returns a new instance of osCinderCSITranslator
Click to show internal directories.
Click to hide internal directories.