Skip to content
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

HTTP Add-on not working with other scalers or when scaled object is created separately #1083

Open
utsav-simplismart opened this issue Jul 4, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@utsav-simplismart
Copy link

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

  1. Create a HTTPScaledObject with below annotation with minimum replica as 0:
annotations:
    httpscaledobject.keda.sh/skip-scaledobject-creation: 'true'
  1. 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
  1. 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

@thomasfroehle
Copy link

I had a similar issue. What worked for me was naming the ScaledObject the same as the HttpScaledObject

@nyobe
Copy link

nyobe commented Sep 29, 2024

I think this is the problem:

key := namespacedName.String()
count := e.pinger.counts()[key]

It should probably be using the httpScaledObjectName specified by the scalerMetadata, rather than the name of the ScaledObject ref

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: To Triage
Development

No branches or pull requests

3 participants