stackset-controller icon indicating copy to clipboard operation
stackset-controller copied to clipboard

Add the type match label

Open jonathanbeber opened this issue 3 years ago • 1 comments

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.

jonathanbeber avatar Nov 03 '21 10:11 jonathanbeber

@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.

jonathanbeber avatar Nov 03 '21 10:11 jonathanbeber

:+1:

gargravarr avatar Sep 06 '23 08:09 gargravarr

:+1:

mikkeloscar avatar Sep 07 '23 07:09 mikkeloscar