Skip to content

Conversation

@alt-dima
Copy link

@alt-dima alt-dima commented Dec 13, 2025

Adds new fallback behaviour "cached".
Fallback will return metric value from cache (if available)

Checklist

  • When introducing a new scaler, I agree with the scaling governance policy
  • I have verified that my change is according to the deprecations & breaking changes policy
  • Tests have been added
  • Ensure make generate-scalers-schema has been run to update any outdated generated files.
  • Changelog has been updated and is aligned with our changelog requirements
  • A PR is opened to update our Helm chart (repo) (if applicable, ie. when deployment manifests are modified)
  • A PR is opened to update the documentation on (repo) (if applicable)
  • Commits are signed with Developer Certificate of Origin (DCO - learn more)

Fixes #6887

Relates to #

Signed-off-by: Dmitriy Altuhov <[email protected]>
@alt-dima alt-dima requested a review from a team as a code owner December 13, 2025 17:16
@github-actions
Copy link

Thank you for your contribution! 🙏

Please understand that we will do our best to review your PR and give you feedback as soon as possible, but please bear with us if it takes a little longer as expected.

While you are waiting, make sure to:

  • Add an entry in our changelog in alphabetical order and link related issue
  • Update the documentation, if needed
  • Add unit & e2e tests for your changes
  • GitHub checks are passing
  • Is the DCO check failing? Here is how you can fix DCO issues

Once the initial tests are successful, a KEDA member will ensure that the e2e tests are run. Once the e2e tests have been successfully completed, the PR may be merged at a later date. Please be patient.

Learn more about our contribution guide.

@keda-automation keda-automation requested a review from a team December 13, 2025 17:16
@snyk-io
Copy link

snyk-io bot commented Dec 13, 2025

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

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.

I like this idea! just smal nits inline

}
case kedav1alpha1.FallbackBehaviorCached:
if len(metrics) > 0 {
log.Info("Fallback behavior is set to cached, using metrics from cache", "scaledObject.Namespace", scaledObject.Namespace, "scaledObject.Name", scaledObject.Name, "metricName", metricName)
Copy link
Member

Choose a reason for hiding this comment

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

I'd set this as V(1), it's regular operation I guess

@@ -0,0 +1,340 @@
/*
Copyright 2021 The KEDA Authors
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Copyright 2021 The KEDA Authors
Copyright 2025 The KEDA Authors

@JorTurFer
Copy link
Member

Could you open a PR also to docs repo adding the new option there too?

@keda-automation keda-automation requested a review from a team December 14, 2025 08:41
@rickbrouwer rickbrouwer added the docs:pending All issues where docs are pending addition/update label Dec 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs:pending All issues where docs are pending addition/update

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Keda blocks scaling when prometheus is down

3 participants