Skip to content
This repository was archived by the owner on Apr 17, 2019. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions cluster-autoscaler/cluster_autoscaler.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ var (
"How long the node should be unneeded before it is eligible for scale down")
scaleDownUtilizationThreshold = flag.Float64("scale-down-utilization-threshold", 0.5,
"Node utilization level, defined as sum of requested resources divided by capacity, below which a node can be considered for scale down")
scaleDownTrialFrequency = flag.Duration("scale-down-trial-frequency", 10*time.Minute,
scaleDownTrialInterval = flag.Duration("scale-down-trial-interval", 10*time.Minute,
"How often scale down possiblity is check")
scanInterval = flag.Duration("scan-interval", 10*time.Second, "How often cluster is reevaluated for scale up or down")
)

func main() {
Expand Down Expand Up @@ -116,7 +117,7 @@ func main() {

for {
select {
case <-time.After(time.Minute):
case <-time.After(*scanInterval):
{
loopStart := time.Now()
updateLastTime("main")
Expand Down Expand Up @@ -204,7 +205,7 @@ func main() {

// In dry run only utilization is updated
calculateUnneededOnly := lastScaleUpTime.Add(*scaleDownDelay).After(time.Now()) ||
lastScaleDownFailedTrial.Add(*scaleDownTrialFrequency).After(time.Now()) ||
lastScaleDownFailedTrial.Add(*scaleDownTrialInterval).After(time.Now()) ||
schedulablePodsPresent

updateLastTime("findUnneeded")
Expand Down
3 changes: 2 additions & 1 deletion hack/verify-flags/known-flags.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,10 @@ right-build-number
running-in-cluster
scale-down-delay
scale-down-enabled
scale-down-trial-frequency
scale-down-trial-interval
scale-down-unneeded-time
scale-down-utilization-threshold
scan-interval
services-configmap
shame-cc
shame-from
Expand Down