http-add-on
http-add-on copied to clipboard
HTTP Add-on not working with other scalers or when scaled object is created separately
Report
Http Add-on standalone is working fine. But when creating a separate scaledobject with httpscaledobject defined as external push trigger, it is not working.
Expected Behavior
It should scale even if the scaledobject is created separately with an external push trigger to the HTTPscaledobject.
Actual Behavior
When using httpscaledobject with below annotation and with minimum replica as 0, it is working fine. It is scaling from 0 to 1 when new request comes in.
annotations:
httpscaledobject.keda.sh/skip-scaledobject-creation: 'false'
But when creating httpscaledobject with annotation set to true and with minimum replica as 0, it is not working even after creating a separate ScaledObject.
annotations:
httpscaledobject.keda.sh/skip-scaledobject-creation: 'true'
The trigger in scaledobject looks like this:
triggers:
- metadata:
httpScaledObject: cognizant-keda-http-scaledobject # name of HTTPScaledObject
scalerAddress: 'keda-add-ons-http-external-scaler.keda:9090'
type: external-push
Steps to Reproduce the Problem
- Create a HTTPScaledObject with below annotation with minimum replica as 0:
annotations:
httpscaledobject.keda.sh/skip-scaledobject-creation: 'true'
- Create a separate Scaledobject with trigger as below with minimum replica as 0:
triggers:
- metadata:
httpScaledObject: cognizant-keda-http-scaledobject # name of HTTPScaledObject
scalerAddress: 'keda-add-ons-http-external-scaler.keda:9090'
type: external-push
- Send a request to target deployment/service.
Logs from KEDA HTTP operator
example
HTTP Add-on Version
0.8.0
Kubernetes Version
None
Platform
Amazon Web Services
Anything else?
No response
I had a similar issue. What worked for me was naming the ScaledObject the same as the HttpScaledObject
I think this is the problem:
https://github.com/kedacore/http-add-on/blob/08c811fe205daaf2bc55c6a46155be2729f21916/scaler/handlers.go#L221-L222
It should probably be using the httpScaledObjectName specified by the scalerMetadata, rather than the name of the ScaledObject ref
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.
This issue has been automatically closed due to inactivity.