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

A kubectl plugin for listing scaling events #3822

Closed
26tanishabanik opened this issue Nov 4, 2022 · 14 comments
Closed

A kubectl plugin for listing scaling events #3822

26tanishabanik opened this issue Nov 4, 2022 · 14 comments
Labels
feature-request All issues for new features that have not been committed to needs-discussion stale All issues that are marked as stale due to inactivity

Comments

@26tanishabanik
Copy link
Contributor

Proposal

A simple kubectl plugin which will list the current scaling events under the deployed keda replicas.

Examples:

kubectl get scaling-events

Output:
NameOfScaler                           Scaling decision
couchdb-scaler                         no of rows greater than threshold
loki-scaler                            metric value greater than a threshold

What do you guys think?
I would be glad to pick this up as soon as this issue receives any positive feedback from the community.

Use-Case

Show the different scaling events of different scalers listed under the keda operator

Anything else?

No response

@26tanishabanik 26tanishabanik added feature-request All issues for new features that have not been committed to needs-discussion labels Nov 4, 2022
@tomkerkhove tomkerkhove moved this to Proposed in Roadmap - KEDA Core Nov 4, 2022
@zroubalik
Copy link
Member

Do you think this use case is worth implementing?

@26tanishabanik
Copy link
Contributor Author

26tanishabanik commented Nov 4, 2022

Do you think this use case is worth implementing?

I think it is, in context that, suppose I would want to know as an user what scalers are available in my cluster currently or the scaling events which are driving the auto scalers or scaling different resources, just using kubectl only

@neelanjan00
Copy link
Contributor

Do you think this use case is worth implementing?

I think it is, in context that, suppose I would want to know as an user what scalers are available in my cluster currently or the scaling events which are driving the auto scalers or scaling different resources, just using kubectl only

Since scalers are defined as part of ScaledJobs/ScaledObjects triggers, I think it will be worth it if we can list them, the trigger(s) that they are using, and the parameter config of the triggers.

@zroubalik
Copy link
Member

Well yeah, but it is not so straighforward to query for this info from KEDA. You will need to manage all of that in the plugin seaprately (which si fine for the list of scalers, but might be a painful process when listing config options per scaler (it is a huge number)).

@26tanishabanik
Copy link
Contributor Author

Do you think this use case is worth implementing?

I think it is, in context that, suppose I would want to know as an user what scalers are available in my cluster currently or the scaling events which are driving the auto scalers or scaling different resources, just using kubectl only

Since scalers are defined as part of ScaledJobs/ScaledObjects triggers, I think it will be worth it if we can list them, the trigger(s) that they are using, and the parameter config of the triggers.

Agreed, that way it will be easier to view all the triggers @neelanjan00

@26tanishabanik
Copy link
Contributor Author

Well yeah, but it is not so straighforward to query for this info from KEDA. You will need to manage all of that in the plugin seaprately (which si fine for the list of scalers, but might be a painful process when listing config options per scaler (it is a huge number)).

That will also be a long list, true @zroubalik , what do you suggest?

@neelanjan00
Copy link
Contributor

Well yeah, but it is not so straighforward to query for this info from KEDA. You will need to manage all of that in the plugin seaprately (which si fine for the list of scalers, but might be a painful process when listing config options per scaler (it is a huge number)).

That's a valid concern, I think. We can have a verbose flag for listing the config options maybe. Otherwise it might be done on a per ScaledJob/ScaledObject basis rather than for all of them at once.

@tomkerkhove
Copy link
Member

I think writing them to our SO/SJ resources would be better: #3764

@zroubalik
Copy link
Member

zroubalik commented Nov 4, 2022

@26tanishabanik @neelanjan00 scalers are not defined on the ScaledObject/Job level, there are just metadata (map[string]string) that needs to be validated for each scaler. So it is not easy (possible) to programatically list all the options.

For example:

func parseActiveMQMetadata(config *ScalerConfig) (*activeMQMetadata, error) {

@zroubalik
Copy link
Member

I think writing them to our SO/SJ resources would be better: #3764

I don't think I follow.

@26tanishabanik
Copy link
Contributor Author

@26tanishabanik @neelanjan00 scalers are not defined on the ScaledObject/Job level, there are just metadata (map[string]string) that needs to be validated for each scaler. So it is not easy (possible) to programatically list all the options.

For example:

func parseActiveMQMetadata(config *ScalerConfig) (*activeMQMetadata, error) {

Can't we just define a parameter in keda itself to define what the event is, and then fetch it? @zroubalik

@tomkerkhove
Copy link
Member

I think writing them to our SO/SJ resources would be better: #3764

I don't think I follow.

#3764 (comment) should clarify this, but basically give insights to how your SO/SJ is doing and when it has last scaled

@stale
Copy link

stale bot commented Jan 6, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale All issues that are marked as stale due to inactivity label Jan 6, 2023
@stale
Copy link

stale bot commented Jan 13, 2023

This issue has been automatically closed due to inactivity.

@stale stale bot closed this as completed Jan 13, 2023
@github-project-automation github-project-automation bot moved this from Proposed to Ready To Ship in Roadmap - KEDA Core Jan 13, 2023
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 stale All issues that are marked as stale due to inactivity
Projects
Archived in project
Development

No branches or pull requests

4 participants