MSSQL Scaler HPA not scaling down deployment to non-zero number #6218
Unanswered
yousamasham
asked this question in
Q&A / Need Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello all,
I have been using the KEDA MSSQL scaler to scale up deployments and my MSSQL query is returning a count of the number of rows. Here is the YAML I am using:
`apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
labels:
app: raw
chart: raw-0.2.3
name: responder-keda
namespace: default
spec:
cooldownPeriod: 20
maxReplicaCount: 20
minReplicaCount: 0
pollingInterval: 5
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: processing-deploy
triggers:
authenticationRef:
name: async-responder-trigger-auth
metadata:
query: SELECT COUNT(*) FROM requestsTable WHERE status in ('READY', 'RETRYING') AND targetService = 'processor-service' AND targetServiceEnv = 'dev/' AND retryCount < 5;
targetValue: "1"`
When the number of rows decreases at the next polling the HPA shows a very large number like this:
For that reason, even after specific requests within the table process and change status, keda HPA does not scale the number of pods down to a non-zero number. I have tried adding an advanced scaleDown section and that works but I wanted to ask if this number in the HPA targets can be changed instead to the number that is returned from the MSSQL scaler query?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions