https://github.com/mercari/tortoise/blob/main/pkg/hpa/service.go#L279-L298
var globalRecommendedHPABehavior = &v2.HorizontalPodAutoscalerBehavior{
ScaleUp: &v2.HPAScalingRules{
Policies: []v2.HPAScalingPolicy{
{
Type: v2.PercentScalingPolicy,
Value: 100,
PeriodSeconds: 60,
},
},
},
ScaleDown: &v2.HPAScalingRules{
Policies: []v2.HPAScalingPolicy{
{
Type: v2.PercentScalingPolicy,
Value: 2,
PeriodSeconds: 90,
},
},
},
}
Change the above current behaviour to the following, which is more similar to the default
https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/#default-behavior
var globalRecommendedHPABehavior = &v2.HorizontalPodAutoscalerBehavior{
ScaleUp: &v2.HPAScalingRules{
Policies: []v2.HPAScalingPolicy{
{
Type: v2.PercentScalingPolicy,
Value: 100,
PeriodSeconds: 60,
},
{ // added.
Type: v2.PodsScalingPolicy,
Value: 4,
PeriodSeconds: 60,
},
},
},
ScaleDown: &v2.HPAScalingRules{
Policies: []v2.HPAScalingPolicy{
{
Type: v2.PercentScalingPolicy,
Value: 2,
PeriodSeconds: 90,
},
},
},
}
https://github.com/mercari/tortoise/blob/main/pkg/hpa/service.go#L279-L298
Change the above current behaviour to the following, which is more similar to the default
https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/#default-behavior