Fix HPA settings to make them more reactive #721
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
spec
ofHorizontalPodAutoscaler
, useValue
instead ofAverageValue
because the query in theDatadogMetric
is already computing an average (avg:
operator at the beginning of the query).As a result, the total number of TPS was wrongly divided twice by the number of pods (once by datadog because of the
avg
operator in the query and once by the HPA itself)We want the HPA to be as reactive as possible in the context of e2e to detect scale up and scale down events as fast as possible here.
The doc says:
We don’t need it because the query in the DatadogMetric already smoothes the values with the
.rollup(60)
.Which scenarios this will impact?
aws/eks
aws/kindvm
Motivation
We noticed some flaky failures of the testHPA in the past.
Additional Notes
This graph shows the behavior of the HPA before and after this change.
![image](https://private-user-images.githubusercontent.com/1437785/317748615-a9a79627-b4de-4b39-a3f8-65c21dc78a41.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTkxOTMzNzUsIm5iZiI6MTcxOTE5MzA3NSwicGF0aCI6Ii8xNDM3Nzg1LzMxNzc0ODYxNS1hOWE3OTYyNy1iNGRlLTRiMzktYTNmOC02NWMyMWRjNzhhNDEucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDYyNCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA2MjRUMDEzNzU1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NzE4ZTM1ODBiOTIyMWQ5NWJmMGRkOTYyNTc0YTgwMjlkNTZlY2Q1MjExMzc4YTA2YTM4YzUxY2Q5NGI5MzNkYiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.XtJf6geCdWQo3mVl4XjLVX9hNX1iM1P_-Yp93EIT8BM)