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

Need a more dynamic way to handle paused ScaledObjects during downtime and deployments #6467

Open
cuixiaojun001 opened this issue Jan 8, 2025 · 0 comments
Labels
feature-request All issues for new features that have not been committed to needs-discussion

Comments

@cuixiaojun001
Copy link

cuixiaojun001 commented Jan 8, 2025

Proposal

Feature Request

I propose adding an enhancement to KEDA to handle these scenarios more dynamically:

  1. Dynamic Transition to Autoscaling: Allow KEDA to automatically transition from a paused state (autoscaling.keda.sh/paused) to normal autoscaling when the associated Deployment scales up from 0 replicas.
  • Example: If the Deployment's replicas are increased from 0 (via manual scale, CI/CD tools, etc.), KEDA should detect this and automatically resume autoscaling without requiring manual annotation removal.
    Pause Behavior Configuration: Introduce a configuration option to specify whether the paused state should persist when replicas increase from 0. For example:
metadata:
  annotations:
    autoscaling.keda.sh/resume-on-scale: "true"

When set to true, KEDA would automatically resume autoscaling once the replica count is greater than 0.

Thank you for considering this request, and I look forward to your thoughts!

Use-Case

Background

In my current use case, I need to temporarily stop services by scaling the associated Deployment replicas to 0. During this downtime, I leverage KEDA's annotations to pause autoscaling:

metadata:
  annotations:
    autoscaling.keda.sh/paused: "true"
    autoscaling.keda.sh/paused-replicas: "0"

This works perfectly for ensuring that KEDA does not unintentionally scale up replicas during maintenance or downtime. However, when I need to resume the service or deploy a new version of the application, I face the following challenges:

  • Manual intervention: Before the deployment, I must manually remove the paused annotation to allow KEDA to resume its autoscaling functionality. This adds significant complexity and risks missing this critical step.
  • Frequent replica adjustments: In scenarios where the deployment needs to scale from 0 to any number of replicas (e.g., for different environments or scaling configurations), manually managing the paused annotation for each deployment becomes unmanageable.

Is this a feature you are interested in implementing yourself?

No

Anything else?

No response

@cuixiaojun001 cuixiaojun001 added feature-request All issues for new features that have not been committed to needs-discussion labels Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request All issues for new features that have not been committed to needs-discussion
Projects
Status: To Triage
Development

No branches or pull requests

1 participant