Implemented the autoscaling steps to be proportions of the max replicas.

Introduced an new label to set the scaling factor that is used to calculate th proportions, setting it to 0 also allows to disable scaling.
Updated the tests to reflect the changes and added a new test which shows that setting the scaling factor to 0 indeed does disable scaling.
Ensured that the scaling factor is always between [0 and 100].

Signed-off-by: Simon Pelczer <templum.dev@gmail.com>
This commit is contained in:
Simon Pelczer
2018-03-23 22:13:07 +01:00
committed by Alex Ellis
parent a3cbe0b4a4
commit 7fe67d7af6
4 changed files with 85 additions and 23 deletions

View File

@ -11,5 +11,6 @@ type ServiceQueryResponse struct {
Replicas uint64
MaxReplicas uint64
MinReplicas uint64
ScalingFactor uint64
AvailableReplicas uint64
}