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

Clear scalers cache correctly both in Operator and Metrics Server #2564

Merged
merged 2 commits into from
Jan 27, 2022

Conversation

zroubalik
Copy link
Member

@zroubalik zroubalik commented Jan 26, 2022

Signed-off-by: Zbynek Roubalik zroubali@redhat.com

This fix should correctly clear/invalidate cache in both KEDA Operator and Metrics Server, when ScaledObject is deleted from cluster, when there is a problem in resolving secrets/credentials or when there is a general problem in scraping metrics from a scaler.
The previous fix #2408 worked only partially - in KEDA Operator, because it didn't use ClearScalersCache() function, but tried to delete the map entry directly. But the main problem was, that the ClearScalersCache() which is being used in Metrics Server, operated on a wrong key, ie. name.namespace instead of kind.namespace.name generated by withTriggers.GenerateIdenitifier(). That resulted in cache not being invalidated in Metrics Server.

Checklist

  • Commits are signed with Developer Certificate of Origin (DCO - learn more)
  • Changelog has been updated

Fixes #2407

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
@zroubalik zroubalik requested a review from a team as a code owner January 26, 2022 22:32
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
@zroubalik
Copy link
Member Author

zroubalik commented Jan 26, 2022

/run-e2e
Update: You can check the progres here

@JacobHenner
Copy link
Contributor

@zroubalik I've just tested the change I am working on (#2495) against this PR. This PR resolves the issue I described in Slack (the metrics server -- but not the operator -- failing to reload secrets in response to auth failures).

I now see one auth failure in the logs at credential expiration time, followed by success once the creds have been reloaded.

Copy link
Member

@JorTurFer JorTurFer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!
Awesome bug fix for the release!! Congrats! 🥇🥇🥇

@zroubalik zroubalik merged commit 6b72e85 into kedacore:main Jan 27, 2022
markrzasa pushed a commit to markrzasa/keda that referenced this pull request Jan 27, 2022
…dacore#2564)

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
Signed-off-by: Mark Rzasa <mark.rzasa@gmail.com>
markrzasa pushed a commit to markrzasa/keda that referenced this pull request Jan 27, 2022
…dacore#2564)

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
Signed-off-by: Mark Rzasa <mark.rzasa@gmail.com>
markrzasa added a commit to markrzasa/keda that referenced this pull request Jan 27, 2022
author Mark Rzasa <mark.rzasa@gmail.com> 1642970493 -0500
committer Mark Rzasa <mark.rzasa@nuance.com> 1643317483 -0500

app insights scaler

Signed-off-by: Mark Rzasa <mark.rzasa@gmail.com>

Add PredictKube scaler (kedacore#2418)

Signed-off-by: Daniel Yavorovych <daniel@dysnix.com>
Signed-off-by: alex60217101990 <alex6021710@gmail.com>

bump deps (kedacore#2563)

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>

Clear scalers cache correctly both in Operator and Metrics Server (kedacore#2564)

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>

test: Provide e2e secrets for Azure Application Insights scaler (kedacore#2568)

Signed-off-by: Tom Kerkhove <kerkhove.tom@gmail.com>
markrzasa added a commit to markrzasa/keda that referenced this pull request Jan 27, 2022
author Mark Rzasa <mark.rzasa@gmail.com> 1642970493 -0500
committer Mark Rzasa <mark.rzasa@nuance.com> 1643317483 -0500

app insights scaler

Signed-off-by: Mark Rzasa <mark.rzasa@gmail.com>

Add PredictKube scaler (kedacore#2418)

Signed-off-by: Daniel Yavorovych <daniel@dysnix.com>
Signed-off-by: alex60217101990 <alex6021710@gmail.com>

bump deps (kedacore#2563)

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>

Clear scalers cache correctly both in Operator and Metrics Server (kedacore#2564)

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>

test: Provide e2e secrets for Azure Application Insights scaler (kedacore#2568)

Signed-off-by: Tom Kerkhove <kerkhove.tom@gmail.com>
Signed-off-by: Mark Rzasa <mark.rzasa@nuance.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Metric name (and other values) is not updated with the changes in the SO
3 participants