Skip to content

Commit

Permalink
Merge pull request kubernetes#3797 from DataDog/aws-not-refreshes-dog…
Browse files Browse the repository at this point in the history
…piles

aws: Don't pile up successive full refreshes during AWS scaledowns
  • Loading branch information
k8s-ci-robot authored and Evan Sheng committed Mar 24, 2022
1 parent bc9e09a commit 5727632
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cluster-autoscaler/cloudprovider/aws/aws_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,9 @@ func (m *AwsManager) DeleteInstances(instances []*AwsInstanceRef) error {
if err := m.asgCache.DeleteInstances(instances); err != nil {
return err
}
klog.V(2).Infof("Some ASG instances might have been deleted, forcing ASG list refresh")
return m.forceRefresh()
klog.V(2).Infof("DeleteInstances was called: scheduling an ASG list refresh for next main loop evaluation")
m.lastRefresh = time.Now().Add(-refreshInterval)
return nil
}

// GetAsgNodes returns Asg nodes.
Expand Down

0 comments on commit 5727632

Please sign in to comment.