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" // AWSEBSTopologyKey is the zonal topology key for AWS EBS CSI driver AWSEBSTopologyKey = "topology." + AWSEBSDriverName + "/zone" )
const ( // AzureDiskDriverName is the name of the CSI driver for Azure Disk AzureDiskDriverName = "disk.csi.azure.com" // AzureDiskInTreePluginName is the name of the intree plugin for Azure Disk AzureDiskInTreePluginName = "kubernetes.io/azure-disk" )
const ( // AzureFileDriverName is the name of the CSI driver for Azure File AzureFileDriverName = "file.csi.azure.com" // AzureFileInTreePluginName is the name of the intree plugin for Azure file AzureFileInTreePluginName = "kubernetes.io/azure-file" )
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" // GCEPDTopologyKey is the zonal topology key for GCE PD CSI Driver GCEPDTopologyKey = "topology.gke.io/zone" // 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" // CinderTopologyKey is the zonal topology key for Cinder CSI Driver CinderTopologyKey = "topology.cinder.csi.openstack.org/zone" // 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 { // TranslateInTreeStorageClassToCSI takes in-tree volume options // and translates them to a volume options consumable by CSI plugin TranslateInTreeStorageClassToCSI(sc *storage.StorageClass) (*storage.StorageClass, error) // TranslateInTreeInlineVolumeToCSI takes a inline volume and will translate // the in-tree inline volume source to a CSIPersistentVolumeSource // A PV object containing the CSIPersistentVolumeSource in it's spec is returned TranslateInTreeInlineVolumeToCSI(volume *v1.Volume) (*v1.PersistentVolume, error) // TranslateInTreePVToCSI takes a persistent volume and will translate // the in-tree pv 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 persistent volume // specification from the API. CanSupport(pv *v1.PersistentVolume) bool // CanSupportInline tests whether the plugin supports a given inline volume // specification from the API. CanSupportInline(vol *v1.Volume) 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 // RepairVolumeHandle generates a correct volume handle based on node ID information. RepairVolumeHandle(volumeHandle, nodeID string) (string, error) }
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 NewAzureDiskCSITranslator ¶
func NewAzureDiskCSITranslator() InTreePlugin
NewAzureDiskCSITranslator returns a new instance of azureDiskTranslator
func NewAzureFileCSITranslator ¶
func NewAzureFileCSITranslator() InTreePlugin
NewAzureFileCSITranslator returns a new instance of azureFileTranslator
func NewGCEPersistentDiskCSITranslator ¶
func NewGCEPersistentDiskCSITranslator() InTreePlugin
NewGCEPersistentDiskCSITranslator returns a new instance of gcePersistentDiskTranslator
func NewOpenStackCinderCSITranslator ¶
func NewOpenStackCinderCSITranslator() InTreePlugin
NewOpenStackCinderCSITranslator returns a new instance of osCinderCSITranslator