Skip to content

Commit

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

[release-1.31] fix: vm-type is not overriding as expected
  • Loading branch information
andyzhangx authored Nov 5, 2024
2 parents fde1f91 + ff04df2 commit 6d821d0
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 @@ -218,10 +218,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 @@ -251,6 +247,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 6d821d0

Please sign in to comment.