csi-translation-lib: k8s.io/csi-translation-lib/plugins Index | Files

package plugins

import "k8s.io/csi-translation-lib/plugins"

Index

Package Files

aws_ebs.go azure_disk.go azure_file.go gce_pd.go in_tree_volume.go openstack_cinder.go

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 (
    // 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"
    // CinderInTreePluginName is the name of the intree plugin for Cinder
    CinderInTreePluginName = "kubernetes.io/cinder"
)

func KubernetesVolumeIDToEBSVolumeID Uses

func KubernetesVolumeIDToEBSVolumeID(kubernetesID string) (string, error)

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

type InTreePlugin Uses

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
}

InTreePlugin handles translations between CSI and in-tree sources in a PV

func NewAWSElasticBlockStoreCSITranslator Uses

func NewAWSElasticBlockStoreCSITranslator() InTreePlugin

NewAWSElasticBlockStoreCSITranslator returns a new instance of awsElasticBlockStoreTranslator

func NewAzureDiskCSITranslator Uses

func NewAzureDiskCSITranslator() InTreePlugin

NewAzureDiskCSITranslator returns a new instance of azureDiskTranslator

func NewAzureFileCSITranslator Uses

func NewAzureFileCSITranslator() InTreePlugin

NewAzureFileCSITranslator returns a new instance of azureFileTranslator

func NewGCEPersistentDiskCSITranslator Uses

func NewGCEPersistentDiskCSITranslator() InTreePlugin

NewGCEPersistentDiskCSITranslator returns a new instance of gcePersistentDiskTranslator

func NewOpenStackCinderCSITranslator Uses

func NewOpenStackCinderCSITranslator() InTreePlugin

NewOpenStackCinderCSITranslator returns a new instance of osCinderCSITranslator

Package plugins imports 10 packages (graph) and is imported by 10 packages. Updated 2019-07-17. Refresh now. Tools for package owners.