Skip to content

Commit dd9474e

Browse files
committed
fix: make changes due to azure sdk upgrade
feat: fix disks client failure fix: revert api-version change revert disks client change
1 parent da20cc2 commit dd9474e

File tree

8 files changed

+11
-11
lines changed

8 files changed

+11
-11
lines changed

staging/src/k8s.io/legacy-cloud-providers/azure/azure_blobDiskController.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ func (c *BlobDiskController) ensureDefaultContainer(storageAccountName string) e
344344
}
345345

346346
// account exists but not ready yet
347-
if provisionState != storage.ProvisioningStateSucceeded {
347+
if provisionState != storage.Succeeded {
348348
// we don't want many attempts to validate the account readiness
349349
// here hence we are locking
350350
counter := 1
@@ -375,7 +375,7 @@ func (c *BlobDiskController) ensureDefaultContainer(storageAccountName string) e
375375
return false, nil // error performing the query - retryable
376376
}
377377

378-
if provisionState == storage.ProvisioningStateSucceeded {
378+
if provisionState == storage.Succeeded {
379379
return true, nil
380380
}
381381

staging/src/k8s.io/legacy-cloud-providers/azure/azure_managedDiskController.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,15 +124,15 @@ func (c *ManagedDiskController) CreateManagedDisk(options *ManagedDiskOptions) (
124124
}
125125
diskProperties.DiskIOPSReadWrite = to.Int64Ptr(diskIOPSReadWrite)
126126

127-
diskMBpsReadWrite := int32(defaultDiskMBpsReadWrite)
127+
diskMBpsReadWrite := int64(defaultDiskMBpsReadWrite)
128128
if options.DiskMBpsReadWrite != "" {
129129
v, err := strconv.Atoi(options.DiskMBpsReadWrite)
130130
if err != nil {
131131
return "", fmt.Errorf("AzureDisk - failed to parse DiskMBpsReadWrite: %v", err)
132132
}
133-
diskMBpsReadWrite = int32(v)
133+
diskMBpsReadWrite = int64(v)
134134
}
135-
diskProperties.DiskMBpsReadWrite = to.Int32Ptr(diskMBpsReadWrite)
135+
diskProperties.DiskMBpsReadWrite = to.Int64Ptr(diskMBpsReadWrite)
136136
} else {
137137
if options.DiskIOPSReadWrite != "" {
138138
return "", fmt.Errorf("AzureDisk - DiskIOPSReadWrite parameter is only applicable in UltraSSD_LRS disk type")

staging/src/k8s.io/legacy-cloud-providers/azure/clients/diskclient/interface.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import (
2727

2828
const (
2929
// APIVersion is the API version for compute.
30-
APIVersion = "2019-12-01"
30+
APIVersion = "2019-07-01"
3131
)
3232

3333
// Interface is the client interface for Disks.

staging/src/k8s.io/legacy-cloud-providers/azure/clients/snapshotclient/interface.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import (
2727

2828
const (
2929
// APIVersion is the API version for compute.
30-
APIVersion = "2019-12-01"
30+
APIVersion = "2019-07-01"
3131
)
3232

3333
// Interface is the client interface for Snapshots.

staging/src/k8s.io/legacy-cloud-providers/azure/clients/vmclient/interface.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import (
2727

2828
const (
2929
// APIVersion is the API version for VirtualMachine.
30-
APIVersion = "2019-12-01"
30+
APIVersion = "2019-07-01"
3131
)
3232

3333
// Interface is the client interface for VirtualMachines.

staging/src/k8s.io/legacy-cloud-providers/azure/clients/vmsizeclient/interface.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import (
2727

2828
const (
2929
// APIVersion is the API version for compute.
30-
APIVersion = "2019-12-01"
30+
APIVersion = "2019-07-01"
3131
)
3232

3333
// Interface is the client interface for VirtualMachineSizes.

staging/src/k8s.io/legacy-cloud-providers/azure/clients/vmssclient/interface.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import (
2727

2828
const (
2929
// APIVersion is the API version for VMSS.
30-
APIVersion = "2019-12-01"
30+
APIVersion = "2019-07-01"
3131
)
3232

3333
// Interface is the client interface for VirtualMachineScaleSet.

staging/src/k8s.io/legacy-cloud-providers/azure/clients/vmssvmclient/interface.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import (
2727

2828
const (
2929
// APIVersion is the API version for VMSS.
30-
APIVersion = "2019-12-01"
30+
APIVersion = "2019-07-01"
3131
)
3232

3333
// Interface is the client interface for VirtualMachineScaleSetVM.

0 commit comments

Comments
 (0)