Skip to content

Commit

Permalink
Merge pull request #2581 from k8s-infra-cherrypick-robot/cherry-pick-…
Browse files Browse the repository at this point in the history
…2578-to-release-1.30

[release-1.30] fix: vm-type is not overriding as expected
  • Loading branch information
andyzhangx authored Nov 6, 2024
2 parents a048d24 + 0c047a9 commit fab7585
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pkg/azuredisk/azuredisk.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,6 @@ func newDriverV1(options *DriverOptions) *Driver {
driver.cloud = cloud

if driver.cloud != nil {
driver.diskController = NewManagedDiskController(driver.cloud)
driver.diskController.DisableUpdateCache = driver.disableUpdateCache
driver.diskController.AttachDetachInitialDelayInMs = int(driver.attachDetachInitialDelayInMs)
driver.diskController.ForceDetachBackoff = driver.forceDetachBackoff
driver.clientFactory = driver.cloud.ComputeClientFactory
if driver.vmType != "" {
klog.V(2).Infof("override VMType(%s) in cloud config as %s", driver.cloud.VMType, driver.vmType)
Expand Down Expand Up @@ -250,6 +246,11 @@ func newDriverV1(options *DriverOptions) *Driver {
driver.cloud.VMCacheTTLInSeconds = int(driver.vmssCacheTTLInSeconds)
driver.cloud.VmssCacheTTLInSeconds = int(driver.vmssCacheTTLInSeconds)
}

driver.diskController = NewManagedDiskController(driver.cloud)
driver.diskController.DisableUpdateCache = driver.disableUpdateCache
driver.diskController.AttachDetachInitialDelayInMs = int(driver.attachDetachInitialDelayInMs)
driver.diskController.ForceDetachBackoff = driver.forceDetachBackoff
}

driver.deviceHelper = optimization.NewSafeDeviceHelper()
Expand Down

0 comments on commit fab7585

Please sign in to comment.