You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I observed oscillating pod counts because both HPA controller & ScaledObject Controller attempt to update the scale subresource of a Deployment when the min & max replicas were misconfigured.
User updated minReplicas & maxReplicas to 27, which in turn updated the HPA, and eventually the Deployment's replica count
User then updated & misconfigured replica counts by setting minReplicas = 50, and maxReplicas = 10, this ment that the HPA object wasn't updated
KEDA then attempted to scale the deployment to 50 replicas in it's reconcile loop and HPA reverting it back to 27. This happened every 5 mins
Expected Behavior
I would expect replica counts to stay at 27 because HPA can't be updated.
In addition, I would expect the ScaledObject webhook to enforce valid min & max replica settings; it should fail to be updated with invalid settings
Actual Behavior
Keda operator would update the /scale subresource and set the replica count to 50
HPA would override this and set it to 27
This behavior happened over and over again until the ScaledObject was fixed and minReplicas was <= maxReplicas
Steps to Reproduce the Problem
I can't seem to reproduce it since it first occurred :-(
Logs from KEDA operator
n/a - lost the logs :-(
here's a k8s audit log of when the deployment is getting scaled by Keda
2023-12-14 01:10:50.000 | cluster=cell-002-00 kind=HorizontalPodAutoscaler name=keda-hpa-my-deployment reason=SuccessfulRescale New size: 27; reason: Current number of replicas above Spec.MaxReplicas
-- | --
KEDA Version
2.12.1
Kubernetes Version
1.27
Platform
None
Scaler Details
No response
Anything else?
I can't seem to reproduce it; Either way though the validating webhook should refuse to create a ScaledObject where minReplicas is > maxReplicas to prevent this misconfiguration.
The text was updated successfully, but these errors were encountered:
Report
I observed oscillating pod counts because both HPA controller & ScaledObject Controller attempt to update the
scale
subresource of a Deployment when the min & max replicas were misconfigured.Here's the order of events:
Expected Behavior
I would expect replica counts to stay at 27 because HPA can't be updated.
In addition, I would expect the ScaledObject webhook to enforce valid min & max replica settings; it should fail to be updated with invalid settings
Actual Behavior
/scale
subresource and set the replica count to 50Steps to Reproduce the Problem
I can't seem to reproduce it since it first occurred :-(
Logs from KEDA operator
n/a - lost the logs :-(
here's a k8s audit log of when the deployment is getting scaled by Keda
and HPA attempting to update this back;
KEDA Version
2.12.1
Kubernetes Version
1.27
Platform
None
Scaler Details
No response
Anything else?
I can't seem to reproduce it; Either way though the validating webhook should refuse to create a ScaledObject where minReplicas is > maxReplicas to prevent this misconfiguration.
The text was updated successfully, but these errors were encountered: