-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add Fallback option UseCurrentReplicasAsMinimum #6464
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: rickbrouwer <[email protected]>
Signed-off-by: rickbrouwer <[email protected]>
Signed-off-by: Rick Brouwer <[email protected]>
Signed-off-by: Rick Brouwer <[email protected]>
Signed-off-by: Rick Brouwer <[email protected]>
Signed-off-by: Rick Brouwer <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, I like this a lot!
caa059c
to
34abee5
Compare
Signed-off-by: rickbrouwer <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a minor suggestion for simplification, I think semantically this should be equivalent, just less code to maintain :)
Let me know if you find any discrepancies
Co-authored-by: Jan Wozniak <[email protected]> Signed-off-by: rickbrouwer <[email protected]>
Co-authored-by: Jan Wozniak <[email protected]> Signed-off-by: rickbrouwer <[email protected]>
Signed-off-by: Rick Brouwer <[email protected]>
Sorry because I'm late, I've posted a comment in the issue about the approach, PTAL and share your thoughts |
When you are running a large number of pods and something goes wrong, Keda uses a
fallback
(if configured). However, the difference between thefallback.replicas
and the current number of replicas can be large."Something going wrong" can also be temporary, which means it can suddenly scale down considerably and then return to the correct number of replicas.
With this PR, I want to make sure that you can indicate that it should use the current number of replicas (
useCurrentReplicasAsMinimum
) as fallback. If the givenfallback.replicas
is higher than the current replicas, then thefallback.replicas
will be used.behavior
) with two optionsstatic
(default) anduseCurrentReplicasAsMinimum
.fallback.go
to retrieve the current number of replicasscale_scaledobjects.go
there was code that determined what the current number of replicas was. This has been moved to thescale_resolvers.go
fallback.replicas
or the current number of replicasIf for any reason this option is not desired, please let me know.
Checklist
Fixes #6450
Docs: kedacore/keda-docs#1519
Relates to discussion: #6334