Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the check for HPA changed #785

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

mikkeloscar
Copy link
Contributor

@mikkeloscar mikkeloscar commented Feb 6, 2025

The metrics-adapter continuously checks for changes between the cached HPAs and HPAs in the cluster to detect potential changes.

The logic for checking if a cached HPA is up-to-date is broken because Metadata of an HPA, e.g. managedFields can change without the actual HPA spec changes which would require a change on the metric collector.

Fix this by only comparing HPA annotations and Spec as those are the only things that matter for comparing HPAs and deciding if the collector should be re-initialized.

Additionally change some logging to be debug logging to reduce noise if nothing changes for a while.

Fix #774

Signed-off-by: Mikkel Oscar Lyderik Larsen <[email protected]>
@mikkeloscar mikkeloscar added the bugfix Bug fixes and patches, e.g. fixing of a production issue that is affecting the customer experience. label Feb 6, 2025
@mikkeloscar
Copy link
Contributor Author

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Bug fixes and patches, e.g. fixing of a production issue that is affecting the customer experience.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Removing previously scheduled metrics collector" happens after every "Collected new external metric"
1 participant