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

Always scales back up to 1 replica on Kubernetes #258

Open
dimber-cais opened this issue Feb 14, 2024 · 2 comments
Open

Always scales back up to 1 replica on Kubernetes #258

dimber-cais opened this issue Feb 14, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@dimber-cais
Copy link

Describe the issue
When Sablier scales up a previously scaled down deployment, it always scales it to 1 pod, and does not return the deployment back to the value of replicas specified in the original YAML.

Context

  • Sablier version: All
  • Provider: Kubernetes
  • Reverse proxy: N/A
  • Sablier running inside a container? Yes

Expected behavior
It should be possible to scale back up to multiple replicas when scaling back up from zero. This could either be by capturing the original spec.replicas for the deployment and using that, or introducing a new sablier.replicas label.

Additional context
This would allow Sablier to be used in scenarios where workloads should both scale to zero when not in use and scale to a highly available multi-instance deployment when in use.

I could try to contribute this as a PR if you are open for this......

@dimber-cais dimber-cais added the bug Something isn't working label Feb 14, 2024
@dimber-cais
Copy link
Author

I think this is the applicable code.

@acouvreur
Copy link
Owner

Hello @dimber-cais,

Do you know how I can retrieve the original replicas ?

What happens if the original replicas is 0 ?

I can add this fairly easily with groups, however the API using names query param would not support it properly, or it would scale all mentioned workloads to this specific replicas.

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

No branches or pull requests

2 participants