-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Support ScaledObject taking over existing HPAs with the same name while they are not managed by other ScaledObject #4537
Support ScaledObject taking over existing HPAs with the same name while they are not managed by other ScaledObject #4537
Conversation
0a8460b
to
b317291
Compare
@pragmaticivan Are you still working on this or waiting for us to review? |
Hi, sorry still working just used the draft so I can figure out how CI is working on this PR |
No worries! |
Folks, I am still not 100% sure, we should go into this direction - ie. changing ownership of existing resources. I might be wrong of course 🤷♂️ |
@zroubalik All good, no attachment to the PR. Maybe we can figure out another creative way to migrate from traditional HPA to ScaledObject progressively. |
Yeah definitely, one of my concerns is, what would happen if the HPA is managed by some other tool? We shouldn't change the ownership, as it could have consequencies. |
@zroubalik I get it, but at this point, it becomes intentional. It requires the hardcoded HPA name + a flag requesting that to be done. If the person pushing that code reaches prod, its likely that they already have the permissions to do that manually and are just trying to migrate an HPA to Keda. Right now, the option is to delete the existing HPA or disable the hook (which is way more dangerous in a multi-tenant cluster). The deletion causes a little bit of downtime because, for some reason, the default HPA behavior for removal is to go down an up to what the workload has set for the number of replicas (which is also dangerous). |
Yeah, these are valid points. I just want to be careful, we might be able to mitigate my concerns. |
@zroubalik We discussed this in our previous standup; maybe the notes help get an idea as well - https://docs.google.com/document/d/1zdwD6j86GxcCe5S5ay9suCO77WPrEDnKSfuaI24EwM4/edit?usp=sharing |
b317291
to
d7c3d44
Compare
Hi, any progress on this PR? |
@bingikarthik I'm getting back to wrapping that up this week, although the code as it is should probably be enough to make the feature work as expected. Just learning my way around the codebase to make sure that's the case but I was able to add some tests. |
Thanks @pragmaticivan for the update! |
9cfc8e5
to
eb99828
Compare
From a user perspective this seems relatively safe and un-surprising. If I ignore the new feature (don't add the annotation) then I get the existing behavior. In order to have it do something new, I would be required to explicitly add the annotation and specify the same name as an existing HPA. One thing I'm not clear on from the PR is where I would specify the HPA name I'm looking to take over (I'm certain this will be covered in the forthcoming documentation). |
@rwkarg yes, doc coming up once I gain confidence that the current code is ok. For instance, it might be the case the label should be |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looking really well :)
I have left some comments inline
tests/internals/scaled_object_validation/scaled_object_validation_test.go
Outdated
Show resolved
Hide resolved
/run-e2e scaled_object_validation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are about to release a new version in a few hours. Would you like to include this into the release? If so, we should hurry up :)
daaf970
to
ae39bb2
Compare
…me while they are not managed by other ScaledObject Signed-off-by: Ivan Santos <[email protected]>
Signed-off-by: Ivan Santos <[email protected]>
Signed-off-by: Ivan Santos <[email protected]>
Signed-off-by: Ivan Santos <[email protected]>
ae39bb2
to
e67097d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
/run-e2e scaled_object_validation |
PR for the doc: kedacore/keda-docs#1166 |
Provide a description of what has been changed
Checklist
Fixes #4457