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

pollingInterval: is not working as expected #6168

Open
MounaVignesh opened this issue Sep 16, 2024 · 0 comments
Open

pollingInterval: is not working as expected #6168

MounaVignesh opened this issue Sep 16, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@MounaVignesh
Copy link

MounaVignesh commented Sep 16, 2024

Report

Im using app.kubernetes.io/version=2.15.1 with below HPA.yml file.. 

HPA.yml 

apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
  name: temp-uat-user
spec:
  scaleTargetRef:
    name: temp-uat-user
  pollingInterval: 60  # Poll every 60 seconds
  cooldownPeriod: 120   # Scale down cooldown period
  minReplicaCount:  2                               # Optional. Default: 0
  maxReplicaCount:  4
  triggers:
    - type: prometheus
      metadata:
        serverAddress: http://prom-kube-prometheus-stack-prometheus.prometheus.svc.cluster.local:9090
        metricName: http_server_requests_seconds # Note: name to identify the metric, generated value would be `prometheus-http_requests_total`
        activationThreshold: '5.5'
        query: sum(rate(http_server_requests_seconds_count{app="temp-uat-user"}[1m]))
        threshold: '2000'
        
        
    =======================================
    
    kubectl get hpa keda-hpa-temp-uat-user -w |  awk '{ print strftime("[%Y-%m-%d %H:%M:%S]"), $0 }'
[2024-09-16 18:11:20] NAME                                 REFERENCE                              TARGETS              MINPODS   MAXPODS   REPLICAS   AGE
[2024-09-16 18:11:20] keda-hpa-temp-uat-user   Deployment/temp-uat-user   <unknown>/2k (avg)   2         4         0          10s
[2024-09-16 18:11:25] keda-hpa-temp-uat-user   Deployment/temp-uat-user   1150m/2k (avg)       2         4         2          15s
[2024-09-16 18:11:55] keda-hpa-temp-uat-user   Deployment/temp-uat-user   1850m/2k (avg)       2         4         2          45s
[2024-09-16 18:12:25] keda-hpa-temp-uat-user   Deployment/temp-uat-user   2233m/2k (avg)       2         4         2          75s
[2024-09-16 18:12:55] keda-hpa-temp-uat-user   Deployment/temp-uat-user   1950m/2k (avg)       2         4         2          105s
[2024-09-16 18:13:25] keda-hpa-temp-uat-user   Deployment/temp-uat-user   2/2k (avg)           2         4         2          2m15s    

=====================================================

**sudo kubectl get scaledobject temp-uat-user -oyaml | grep pollingInterval
  pollingInterval: 60**

Expected Behavior

pollingInterval: 60 is not working as expected and scale up and scale down also not working.

Actual Behavior

pollingInterval: 60 instead of this 30 seconds pollingInterval happening

Steps to Reproduce the Problem

  1. I want to check prometheus HTTP request for every 10seconds and scaling should happen using those metrics.

Logs from KEDA operator

example

KEDA Version

2.15.1

Kubernetes Version

1.29

Platform

Amazon Web Services

Scaler Details

prometheus custom metrics

Anything else?

No response

@MounaVignesh MounaVignesh added the bug Something isn't working label Sep 16, 2024
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

1 participant