package plugins
import "k8s.io/kubernetes/staging/src/k8s.io/csi-translation-lib/plugins"
Index ¶
- Constants
- func KubernetesVolumeIDToEBSVolumeID(kubernetesID string) (string, error)
- type InTreePlugin
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" // UnspecifiedValue is used for an unknown zone string UnspecifiedValue = "UNSPECIFIED" )
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" )
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
Source Files ¶
aws_ebs.go gce_pd.go in_tree_volume.go openstack_cinder.go
- Version
- v1.14.1-beta.0
- Published
- Mar 25, 2019
- Platform
- linux/amd64
- Imports
- 8 packages
- Last checked
- 36 seconds ago –
Tools for package owners.