-
Notifications
You must be signed in to change notification settings - Fork 998
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
Cron Scaler: desiredReplicas is 0 but it sets to 1 anyway #5586
Comments
Apparently if I understood right from #5585 (comment), #3609, #1759 , #2153, #4474, #3956, It seems that setting Would it be possible to do validation on keda side ? It seems (if I understood right) that |
The problem is that the scaler is just a metric source. Cron scaler isn't 100% clear about the behaviour, but |
In this case, instead of setting the cron with |
Yes, I already proposed some documentation changes at kedacore/keda-docs#1332 But maybe you can propose some more clear wording in that PR since you seem to know better the details and terminology.
But there is no other metrics at all (that I know of)
I guess that why it's so hard for me to understand that this is expected, the only explicit intruction is to set it to 0 , where is the conflicting instruction to set it to 1 coming from?
Yes, and this is what I try to be explicit about in kedacore/keda-docs#1332
But Anyway at least maybe the explicit documentation will suffice, I know I wanted to set |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. |
Report
I have a new namespace, deployment and scaledobject
replicas: 0
initiallyAlthought the example is contrived, it's the simplest setup that I could get to reproduce the problem. The actual problem is that I wanted to use the cron scaler to downscale to 0 certain deployment outside working hours since that deployment runs on expensive hardware that is provisioned/deprovisioned dynamically.
I can see that initially the HPA says
then after the cron scaler does it's thing. it changes to
it seem hat the metric
s0-cron-Europe-Stockholm-5615xxx-5616xxx
says to scale to 1 . In any case the net result is that after that trigger a pod is created, when the desired was 0 (and the current was 0 also)Expected Behavior
I was expecting that if the cron scaler says
desiredReplicas: "0"
no pod will be created.Actual Behavior
Seems to create pod / increase desired replicas to 1
Steps to Reproduce the Problem
Steps to reproduce:
manifest.jsonnet:
Running this deletes the namespace "rubentest" and all the resources under, then recreates the namespace,deployment and scaledobject with a cron scaler set to trigger 3 minutes after current date.
Logs from KEDA operator
Note the
"Original Replicas Count": 0, "New Replicas Count": 1}
belowThe text was updated successfully, but these errors were encountered: