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

ScaledObject ready condition changed will not fix HPA in some situation #3096

Closed
champly opened this issue Jun 1, 2022 · 0 comments · Fixed by #3097
Closed

ScaledObject ready condition changed will not fix HPA in some situation #3096

champly opened this issue Jun 1, 2022 · 0 comments · Fixed by #3097
Labels
bug Something isn't working

Comments

@champly
Copy link
Contributor

champly commented Jun 1, 2022

Report

ScaledObject:

apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
  finalizers:
  - finalizer.keda.sh
  generation: 8
  labels:
    app: aabb-ab007
  name: aabb-ab007
  namespace: default
  ownerReferences:
  - apiVersion: basefeatures.symcn.com/v1alpha1
    blockOwnerDeletion: true
    controller: true
    kind: BaseFeature
    name: aabb-ab007
    uid: f9ef1592-b164-4c55-a518-4eb01b832cce
spec:
  fallback:
    failureThreshold: 5
    replicas: 2
  maxReplicaCount: 3
  minReplicaCount: 1
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: aabb-ab007
  triggers:
  - metadata:
      app: aabb-ab007
      metricName: QPS
      scalerAddress: keda-external.default.svc:8080
      targetSize: "200"
    metricType: AverageValue
    name: QPS
    type: external
  - metadata:
      app: aabb-ab007
      value: "51"
    metricType: Utilization
    name: cpu
    type: cpu
status:
  conditions:
  - message: ScaledObject is defined correctly and is ready for scaling
    reason: ScaledObjectReady
    status: "True"
    type: Ready
  - message: Scaling is performed because triggers are active
    reason: ScalerActive
    status: "True"
    type: Active
  - message: No fallbacks are active on this scaled object
    reason: NoFallbackFound
    status: "False"
    type: Fallback
  externalMetricNames:
  - s0-QPS
  health:
    s0-qps:
      numberOfFailures: 0
      status: Happy
  lastActiveTime: "2022-06-01T03:21:46Z"
  originalReplicaCount: 1
  resourceMetricNames:
  - cpu
  scaleTargetGVKR:
    group: apps
    kind: Deployment
    resource: deployments
    version: v1
  scaleTargetKind: apps/v1.Deployment

If my own keda-external service offline, Keda metrics-apiserver logic will update HPA resource current metrics, and will trigger Keda operator Reconcile to update HPA.Spec. And then, the keda-external service online, Keda operator just update ScaledObject Ready condition, but if the CPU metrics is zero, HPA resource will not modify, so ScaledObject will not fix HAP resource.

Expected Behavior

Will auto fix HPA resource when the keda-external service back to normal.

Actual Behavior

If the CPU metrics is zero always, the HPA resouce will not update.

Steps to Reproduce the Problem

Logs from KEDA operator

example

KEDA Version

2.7.1

Kubernetes Version

1.20

Platform

Any

Scaler Details

No response

Anything else?

No response

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
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant