const AWSEBSDriverName … const AWSEBSInTreePluginName … const AWSEBSTopologyKey … const iopsPerGBKey … const allowIncreaseIOPSKey … var _ … type awsElasticBlockStoreCSITranslator … // NewAWSElasticBlockStoreCSITranslator returns a new instance of awsElasticBlockStoreTranslator func NewAWSElasticBlockStoreCSITranslator() InTreePlugin { … } // TranslateInTreeStorageClassToCSI translates InTree EBS storage class parameters to CSI storage class func (t *awsElasticBlockStoreCSITranslator) TranslateInTreeStorageClassToCSI(logger klog.Logger, sc *storage.StorageClass) (*storage.StorageClass, error) { … } // TranslateInTreeInlineVolumeToCSI takes a Volume with AWSElasticBlockStore set from in-tree // and converts the AWSElasticBlockStore source to a CSIPersistentVolumeSource func (t *awsElasticBlockStoreCSITranslator) TranslateInTreeInlineVolumeToCSI(logger klog.Logger, volume *v1.Volume, podNamespace string) (*v1.PersistentVolume, error) { … } // TranslateInTreePVToCSI takes a PV with AWSElasticBlockStore set from in-tree // and converts the AWSElasticBlockStore source to a CSIPersistentVolumeSource func (t *awsElasticBlockStoreCSITranslator) TranslateInTreePVToCSI(logger klog.Logger, pv *v1.PersistentVolume) (*v1.PersistentVolume, error) { … } // TranslateCSIPVToInTree takes a PV with CSIPersistentVolumeSource set and // translates the EBS CSI source to a AWSElasticBlockStore source. func (t *awsElasticBlockStoreCSITranslator) TranslateCSIPVToInTree(pv *v1.PersistentVolume) (*v1.PersistentVolume, error) { … } // CanSupport tests whether the plugin supports a given persistent volume // specification from the API. The spec pointer should be considered // const. func (t *awsElasticBlockStoreCSITranslator) CanSupport(pv *v1.PersistentVolume) bool { … } // CanSupportInline tests whether the plugin supports a given inline volume // specification from the API. The spec pointer should be considered // const. func (t *awsElasticBlockStoreCSITranslator) CanSupportInline(volume *v1.Volume) bool { … } // GetInTreePluginName returns the name of the intree plugin driver func (t *awsElasticBlockStoreCSITranslator) GetInTreePluginName() string { … } // GetCSIPluginName returns the name of the CSI plugin func (t *awsElasticBlockStoreCSITranslator) GetCSIPluginName() string { … } func (t *awsElasticBlockStoreCSITranslator) RepairVolumeHandle(volumeHandle, nodeID string) (string, error) { … } var awsVolumeRegMatch … // KubernetesVolumeIDToEBSVolumeID translates Kubernetes volume ID to EBS volume ID // KubernetesVolumeID 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 func KubernetesVolumeIDToEBSVolumeID(kubernetesID string) (string, error) { … } func getAwsRegionFromZones(zones []string) (string, error) { … }