Skip to content

Commit

Permalink
Merge pull request kubernetes#7582 from comtalyst/comtalyst/spot-refr…
Browse files Browse the repository at this point in the history
…esh-1.29

[cluster-autoscaler-release-1.29] 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 9026d94 + 2b6f4fd commit f160b1d
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 @@ -1063,7 +1063,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 f160b1d

Please sign in to comment.