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

Feature Request: Scale all selected items #1209

Closed
jakub-klapka opened this issue Jul 28, 2021 · 3 comments · Fixed by #1218
Closed

Feature Request: Scale all selected items #1209

jakub-klapka opened this issue Jul 28, 2021 · 3 comments · Fixed by #1218
Labels
question Further information is requested

Comments

@jakub-klapka
Copy link

It would be useful, if scale can be done on whole selected list of items, in the same manner as delete.

For example, with current way of filtering and batch selecting, this is only thing missing, to filter some type of deployments and scale them all down to 0 or back up, when needed.

Thanks for k9s! Jakub

@Volatus
Copy link

Volatus commented Aug 4, 2021

@jakub-klapka I'm able to select and scale multiple StatefulSets.

@derailed derailed added the question Further information is requested label Aug 4, 2021
@derailed
Copy link
Owner

derailed commented Aug 4, 2021

@jakub-klapka Thank you for this feedback! The reason why we currently don't offer multi select is we're tracking the current replicas on the selected instance. Thus if you select multiple instances how could you track the current replica counts? If the intent is going down to zero that might be ok but what happens if your selections have different replica counts? This could lead to situation where you inadvertently reset all the replicas across different dp or sts as listing out all the selected replicas in a dialog might not be a practical way to go??

@jakub-klapka
Copy link
Author

Well, yes, it would be possible to do that only, when you are setting all deployment replicas to same value.
In my experience however, this is very often the case. You are right, that you can inadvertently set something you don't want, but the same applies to batch delete. In either case, you should know, what you are doing :) And, of course, the dialog can help with that awareness saying something like "Scale all 24 deployments to:", as it does with batch delete.

Another approach, which comes to my mind, is not scaling "to", but scaling "by". I mean increasing or decreasing all selected deployments by specified ammount (+5, -3 etc.) But that would need some more UX thinking/discussion, as it should behave similar as scale of only one item. If scale of one dp would work as "scaling to x" but scale of batch would do "scale by x", that would be bad UX in my opinion.

I'm also thnking about saving number of "original" replicas somewhere (annotations?), so you will be able to "restore" previous replica counts, but that is definitely way harder to implement. And I'm not sure, if it's worth it (or even posible).

In general, I don't see much of a difference compared to batch delete. In both cases, it's "risky" operation, as you always loose some information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants