mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-25 20:29:56 +00:00
AWS: Update copy-paste of GCE PD code to latest version
We are (sadly) using a copy-and-paste of the GCE PD code for AWS EBS. This code hasn't been updated in a while, and it seems that the GCE code has some code to make volume mounting more robust that we should copy.
This commit is contained in:
@@ -326,7 +326,7 @@ func createPD() (string, error) {
|
||||
}
|
||||
volumeOptions := &awscloud.VolumeOptions{}
|
||||
volumeOptions.CapacityGB = 10
|
||||
return volumes.CreateVolume(volumeOptions)
|
||||
return volumes.CreateDisk(volumeOptions)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -353,7 +353,7 @@ func deletePD(pdName string) error {
|
||||
if !ok {
|
||||
return fmt.Errorf("Provider does not support volumes")
|
||||
}
|
||||
return volumes.DeleteVolume(pdName)
|
||||
return volumes.DeleteDisk(pdName)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -383,7 +383,8 @@ func detachPD(hostName, pdName string) error {
|
||||
if !ok {
|
||||
return fmt.Errorf("Provider does not support volumes")
|
||||
}
|
||||
return volumes.DetachDisk(hostName, pdName)
|
||||
_, err := volumes.DetachDisk(hostName, pdName)
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user