autoscaler
autoscaler copied to clipboard
Feature: support minimum idle time before terminating server
This attempts to add support for DRONE_POOL_MIN_IDLE
, which will define the minimum idle time before a server is terminated. It defaults to 0
, but if you set it to 30m
then it will only terminate a server after it has sat idle for at least 30 minutes (no jobs have run). It utilizes the Updated
server property, which I believe gets updated as the server changes state from running
to pending
status. As it completes the builds, this should represent when the last build finished. As such, if jobs continue to fire regularly, then it stays online, but if jobs stop, it would then terminate after this duration.
I'm currently trying to get a test installation online to test these changes, but figured I'd see if folks had feedback regardless.