mercari / tortoise

Tortoise: Shell-Shockingly-Good Kubernetes Autoscaling
MIT License
316 stars 14 forks source link

ignore high replica number for the first 30 min #382

Closed sanposhiho closed 4 months ago

sanposhiho commented 4 months ago

What this PR does / why we need it:

To prevent the deployment from creating too many but too small replicas, Tortoise has the feature that when the replica number goes higher than 30 (this threshold is configurable via PreferredMaxReplicas), it tries to make Pods vertically bigger. In the current implementation, it happens every 30 min. So, it's like: [replica goes high] → make Pods bigger -30m-> make Pods bigger if still high → ...

This PR changes it ignores a replica number higher than PreferredMaxReplicas for the first 30 min so that we can ignore high replica number during a short period of time. So, it'll be like: [replica goes high] -30m-> make Pods bigger -30m-> make Pods bigger if still high → ...

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer: