-
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
Pausing keda with either paused-replicas
or paused
annotation causes the replicas to jump in between 0-1
#5165
Comments
Could you provide more detail about your scaledobject? Did you try it with other scaler like |
I just used the CPU scaler - here’s what the scaledobject looks like. I’ve changed the
|
The CPU/MEM scaler doesn't support minReplicaCount=0, so when the CPU/MEM scaler is created, the target pod will be scaled to 1 immediately. After the annotation is set, the target will be scaled down to 0. |
Yes I agree, but whenever I set the either only the However, the expectation was that using only |
I waited for 5 minutes but did not see the bouncing behavior in my test environment. I only set |
I checked again and it seems like I had some local issue that caused this to behave weirdly with kube-downscaler that I was using. Thanks for checking! Will close this PR! |
Report
I'm using keda to pause deployments in google cloud and we have monitoring with prometheus and grafana. I'm using keda version 2.12, which has two annotations for pause, namely,
autoscaling.keda.sh/paused-replicas
andautoscaling.keda.sh/paused
. According to the docs here, either one can be used to pause a deployment with different use cases.In practice, I see that when I use either
paused-replicas
orpaused
annotation, the replicas bounce around between [1-0] but when I use both together, only then does this "bouncing around" stop and the replicas stay at 0 .In the grafana plot attached,
region A
is when paused-replicas is added to the scaled object,region B
is when paused is added and the region to the right of B, is when both annotations are added.Expected Behavior
The expected working of the pause annotations according to the docs here suggest that the annotation
autoscaling.keda.sh/paused
will pause scaling immediately and use the current instance count while the annotationautoscaling.keda.sh/paused-replicas: "<number>"
will scale your current workload to specified amount of replicas and pause autoscaling.It is also stated that either one of the annotations is typically used based on the scenario and so I’d expect that using either one of the annotations should pause the scaled object successfully and maintain the replicas at
0
.Actual Behavior
Actual behavior as described in the report is that the replicas are only maintained at
0
when both annotations are set together. The region to the right ofRegion B
shows the test when the keda scaled object has both annotations i.e.Steps to Reproduce the Problem
autoscaling.keda.sh/paused-replicas: "0"
or theautoscaling.keda.sh/paused: "true"
annotation and check if the replicas remain at 0. This should result in the bouncing around of replicas between 0-1 based on my observations.0
based on my observations.Logs from KEDA operator
No response
KEDA Version
2.12.0
Kubernetes Version
1.27
Platform
Google Cloud
Scaler Details
CPU
Anything else?
No response
The text was updated successfully, but these errors were encountered: