Skip to content

Commit

Permalink
fix override vmtype
Browse files Browse the repository at this point in the history
  • Loading branch information
umagnus committed Oct 31, 2024
1 parent 4e07d51 commit 7b8a159
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 7b8a159

Please sign in to comment.