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

Metrics API scaler does not support Quantities #1667

Closed
devjoes opened this issue Mar 12, 2021 · 0 comments · Fixed by #1668
Closed

Metrics API scaler does not support Quantities #1667

devjoes opened this issue Mar 12, 2021 · 0 comments · Fixed by #1668
Labels
bug Something isn't working

Comments

@devjoes
Copy link
Contributor

devjoes commented Mar 12, 2021

Report

The metrics API is unable to process Quantities (even simple numeric ones.) This is because they are serialized to strings. KEDA actually returns Quantities itself so this scaler would no be able to process them either.

Expected Behavior

I receive an API response like this:

{"foo":"123"}

I am able to reference it like this

  triggers:
  - type: metrics-api
    metadata:
      targetValue: "0"
      url: "https://blah"
      valueLocation: "foo"

Actual Behavior

The error:
valueLocation must point to value of type number got: String

Steps to Reproduce the Problem

1.Make/use an API that returns quantities
2.Point the metrics API scaler at it
3.Observe error

Logs from KEDA operator

example

KEDA Version

2.1.0

Kubernetes Version

1.17

Platform

Any

Scaler Details

metrics-api

PR will be raised to fix issue in a minute

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
None yet
Development

Successfully merging a pull request may close this issue.

1 participant