stackset-controller
stackset-controller copied to clipboard
Add the type match label
When using the autoscaler
we are still letting kube-metrics-adapter
to rely in the metric name. This commit adds the type
label to the
ZMON and SQS queue len metrics. It also sorts the metrics before
generating them, based on different criteria.
Previously, sort was based just on the HPA metric type. Now sort is done
by StackSet
's autoscaler
metric type and once it conflicts
Average
, AverageUtilization
, etc. It guarantees we support multiple
metrics of the same type and do not regenerate the HPA if Kubernetes
sends the metrics in a different order.
@mikkeloscar I didn't investigate too deep, but from what I understood we don't have any other metric in the autoscaler
type that could use the type too.
Also, I'm not sure if we would have any advantage in changing the metric name field since we don't have better information but use the type as we have been doing.
:+1:
:+1: