mirror of
https://github.com/zalando-incubator/kube-metrics-adapter.git
synced 2024-12-22 11:06:04 +00:00
0bf8f5dd0f
The current implementation of the metrics store for custom metrics uses just the object name as key. When scenarios where two HPAs reference the same object but have different metric calculation (e.g. ingresses with different weights), kube-metrics-adapter calculates the two metrics but always overrides one of the metrics when saving it to the store. This commit implements the use of a labels hash in the custom metrics store. This way, metrics are identified not just by the referenced object, but also by its selectors. Co-authored-by: Katyanna Moura <amelie.kn@gmail.com> Signed-off-by: Jonathan Juares Beber <jonathanbeber@gmail.com>