mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 04:06:03 +00:00
Merge pull request #84844 from leakingtapan/ebs-migration
Fix migration tranlation library for ebs
This commit is contained in:
commit
05f66b38fd
@ -57,6 +57,10 @@ func (t *awsElasticBlockStoreCSITranslator) TranslateInTreeInlineVolumeToCSI(vol
|
||||
return nil, fmt.Errorf("volume is nil or AWS EBS not defined on volume")
|
||||
}
|
||||
ebsSource := volume.AWSElasticBlockStore
|
||||
volumeHandle, err := KubernetesVolumeIDToEBSVolumeID(ebsSource.VolumeID)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to translate Kubernetes ID to EBS Volume ID %v", err)
|
||||
}
|
||||
pv := &v1.PersistentVolume{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
// A.K.A InnerVolumeSpecName required to match for Unmount
|
||||
@ -66,7 +70,7 @@ func (t *awsElasticBlockStoreCSITranslator) TranslateInTreeInlineVolumeToCSI(vol
|
||||
PersistentVolumeSource: v1.PersistentVolumeSource{
|
||||
CSI: &v1.CSIPersistentVolumeSource{
|
||||
Driver: AWSEBSDriverName,
|
||||
VolumeHandle: ebsSource.VolumeID,
|
||||
VolumeHandle: volumeHandle,
|
||||
ReadOnly: ebsSource.ReadOnly,
|
||||
FSType: ebsSource.FSType,
|
||||
VolumeAttributes: map[string]string{
|
||||
|
Loading…
Reference in New Issue
Block a user