mercari / tortoise

Tortoise: Shell-Shockingly-Good Kubernetes Autoscaling
MIT License
400 stars 15 forks source link

Make `tortoise.Spec.ResourcePolicy.MinAllocatedResources` mutable #228

Closed sanposhiho closed 8 months ago

sanposhiho commented 9 months ago

We have a tortoise.Spec.ResourcePolicy.MinAllocatedResources that defines how much resources each container must have at least. https://github.com/mercari/tortoise/blob/main/docs/user-guide.md#specresourcepolicy

We're using VPA internally to provide vertical-scaling feature to users. (see https://github.com/mercari/tortoise/blob/main/docs/internal.md)

Currently, MinAllocatedResources works like, when tortoise internally initializes VPAs, it sets MinAllowed so that VPA won't suggest the value lower than MinAllocatedResources.

The problem here is that, it means that we cannot update MinAllocatedResources since it's honored only when Tortoise is created.

This issue aims to make it mutable - meaning when tortoise's MinAllocatedResources is changed, we change corresponding VPAs' MinAllowed as well.

sanposhiho commented 8 months ago

It's done by https://github.com/mercari/tortoise/pull/249.