-
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
Provide support for explicitly pausing autoscaling of ScaledObjects at the current replica count #3304
Comments
When the annotation is set to |
This will be a side-effect, but should not happen actually. Instead, end-users should apply the So once you apply that annotation, KEDA will scale the target workload to the specified instance count (implicitly this will change your deployment in this case) and stop scaling it until the annotation is removed. Hope that clarifies things? |
Yeah, would be nicer if it just paused autoscaling entirely, basically pretending like the HPA object doesnt exist, effectively giving control back to the user. I can already achieve what |
If you just want to pause in current replica count, you can already do that today: https://keda.sh/docs/latest/concepts/scaling-deployments/#pause-autoscaling |
hmmm maybe we have different definitions of what I'm trying to say, haha. I just tried that, and by setting my It seems the pause functionality still gives Keda control....I want to take control back and modify the deployment on a whim, basically as if no |
Or am I missing something @JorTurFer @zroubalik? What PR are you referring to @jbilliau-rcd? |
@tomkerkhove what do you mean it's not implemented yet? It's in the official docs! https://keda.sh/docs/2.8/concepts/scaling-deployments/#pause-autoscaling It was implemented in #944 |
Oh yes, I have it the other way around - Sorry! Would you mind opening a separate bug for this please? This feature is to allow |
Right, that's fine, just wanted to confirm that's what it did and not just pause scaling entirely, regardless of manually modified deployment replica count. We good! |
Well just for sake of clarity, if you apply The goal of |
For clarity on the expected scenario: PS: I am asking this since I am planning to work on this as my first contribution @tomkerkhove |
The gist is that KEDA should not perform any scaling when
Paused replicas is not in the CRD so this is not applicable, otherwise - Yes. If they add the
If the attribute is applied then simply don't do anything and make sure that the scale target just runs whatever it runs.
Awesome, thank you! Can you make sure that the CRD events also has entries on when it gets paused and unpasued please? |
HI Everyone (base) pc@lenvo:~/Documents/scw-heb$ kubectl apply -f consumber.deployment.svc.yaml |
@pintu0946 the apiVersion is |
Thanks for Support, |
Proposal
Similarly to #3303, it would be nice to provide support for explicitly pausing autoscaling of ScaledObjects at the current replica count so that it no longer scales out/in.
This should be done by applying the
autoscaling.keda.sh/is-paused: true
annotation on the ScaledObjects resource. When this is the case, the ScaledObject just sticks with the current amount of replicas when it was applied.Use-Case
Pause autoscaling without having to check how many replicas we run today.
Anything else?
This is in addition to our existing
autoscaling.keda.sh/paused-replicas: <replica-amount>
which allows you to specify a replica count.When both annotations are applied, the following logic should be used:
autoscaling.keda.sh/paused-replicas
is specified, stop autoscaling and puts to given amountautoscaling.keda.sh/is-paused
is there, just stop autoscaling and keep it at the current instance countAs a workaround, people can use
autoscaling.keda.sh/paused-replicas
as following:Follow-up for #944
The text was updated successfully, but these errors were encountered: