substratusai / lingo

Lightweight ML model proxy and autoscaler for kubernetes
https://www.substratus.ai
Apache License 2.0
96 stars 6 forks source link

Stop scale down timer #70

Closed alpe closed 5 months ago

alpe commented 5 months ago

See: #67

When a deployment is deleted on reconcile there may still be a scale down timer running that modifies k8s replica state later. With this PR, the timer is stopped.

samos123 commented 5 months ago

This won't fix #67 since in my case I never deleted a deployment yet still triggered the issue. So not sure if this patch is needed. That being said, I think this fix is helpful because otherwise the timers would just keep on going even after the scaler is deleted?

This was an interesting read: https://medium.com/@oboturov/golang-time-after-is-not-garbage-collected-4cbc94740082

samos123 commented 5 months ago

I will include this in #76