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

Add documentation for replacing existing HPA with an Scaled Object without deleting the existing resource #4066

Closed
ghost opened this issue Nov 3, 2022 · 11 comments
Labels
feature-request All issues for new features that have not been committed to stale All issues that are marked as stale due to inactivity

Comments

@ghost
Copy link

ghost commented Nov 3, 2022

Use-Case

In a company where most of the services already have HPA, it would be ideal to have a backward compatible transition to ScaledObjects where it would take over the existing HPA, while the user would only need to delete the HPA yaml file (not using git ops).

@ksemele
Copy link

ksemele commented Dec 30, 2022

Actually maybe need simple example with deployment in k8s - needed to delete hpa section? needed to delete replica count or not?

@tomkerkhove tomkerkhove transferred this issue from kedacore/keda-docs Jan 3, 2023
@tomkerkhove
Copy link
Member

Transferring to core repo as this might be a feature we can introduce. If not, then we should provide better docs

@JorTurFer
Copy link
Member

@ksemele ,
Do you mean an example about how to deploy a workload with KEDA? If that's your request, there are some exmples in kedarcore org, with Azure Service Bus and also with RabbitMQ

@JorTurFer JorTurFer added the feature-request All issues for new features that have not been committed to label Jan 17, 2023
@stale
Copy link

stale bot commented Mar 18, 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 Mar 18, 2023
@stale
Copy link

stale bot commented Mar 25, 2023

This issue has been automatically closed due to inactivity.

@stale stale bot closed this as completed Mar 25, 2023
@github-project-automation github-project-automation bot moved this from Proposed to Ready To Ship in Roadmap - KEDA Core Mar 25, 2023
@pragmaticivan
Copy link
Contributor

This feels relevant, by using advanced.horizontalPodAutoscalerConfig.name with the same name as the HPA, would that replace the existing resource? @JorTurFer @tomkerkhove

@JorTurFer
Copy link
Member

Currently, there isn't any way to do it because the validation webhook will block the ScaledObject if it's already managed by another ScaledObject or HPA, so you can't deploy a ScaledObject for a workload already monitored by another HPA.

⚠️ Under your own risk as an expert user: I have tried disabling the webhooks and it works (KEDA replaces the already existing HPA, taking the control), but remember to enable again the webhooks after it because they are there to avoid problems like 2 ScaledObject monitoring the same workload (with a crazy result)

@pragmaticivan
Copy link
Contributor

@JorTurFer
Do you see a world where the validation webhook would skip that if a flag is in place and the other resource is just an HPA (without any metadata relating it to a Scaled Object) ?

Something like:

advanced.takeOverExistingHPA = true

@JorTurFer
Copy link
Member

JorTurFer commented Apr 14, 2023

I think that it's something doable and it could enable migration scenarios 😄

Could you open another issue to track the new feature?

@pragmaticivan
Copy link
Contributor

Yes, thx!!

@pragmaticivan
Copy link
Contributor

Done: #4457

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 stale All issues that are marked as stale due to inactivity
Projects
Archived in project
Development

No branches or pull requests

4 participants