Skip to content

Commit

Permalink
Merge pull request #7583 from comtalyst/comtalyst/spot-refresh-1.28
Browse files Browse the repository at this point in the history
[cluster-autoscaler-release-1.28] fix: correctly set the default refresh period for VMSS size (used for Spot instances)
  • Loading branch information
k8s-ci-robot authored Dec 8, 2024
2 parents a3a96e5 + cbf930a commit 004c1b4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1038,7 +1038,7 @@ func TestGetFilteredAutoscalingGroupsVmss(t *testing.T) {
enableForceDelete: manager.config.EnableForceDelete,
curSize: 3,
sizeRefreshPeriod: manager.azureCache.refreshInterval,
getVmssSizeRefreshPeriod: time.Duration(manager.azureCache.refreshInterval) * time.Second,
getVmssSizeRefreshPeriod: manager.azureCache.refreshInterval,
InstanceCache: InstanceCache{instancesRefreshPeriod: defaultVmssInstancesRefreshPeriod},
}}
assert.True(t, assert.ObjectsAreEqualValues(expectedAsgs, asgs), "expected %#v, but found: %#v", expectedAsgs, asgs)
Expand Down
2 changes: 1 addition & 1 deletion cluster-autoscaler/cloudprovider/azure/azure_scale_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ func NewScaleSet(spec *dynamic.NodeGroupSpec, az *AzureManager, curSize int64, d
if az.config.GetVmssSizeRefreshPeriod != 0 {
scaleSet.getVmssSizeRefreshPeriod = time.Duration(az.config.GetVmssSizeRefreshPeriod) * time.Second
} else {
scaleSet.getVmssSizeRefreshPeriod = time.Duration(az.azureCache.refreshInterval) * time.Second
scaleSet.getVmssSizeRefreshPeriod = az.azureCache.refreshInterval
}

if az.config.EnableDetailedCSEMessage {
Expand Down

0 comments on commit 004c1b4

Please sign in to comment.