-
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
feat: Add annotations from ScaledObject to HPA #2659
Conversation
e41db5b
to
55039f4
Compare
Would be nice to see if we can have automated tests for this |
@tomkerkhove Sure. I will work on it on a week |
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.
Hi,
Thanks for this improvement, could you add some test for this feature please?
We have a specific tests file for scaledObjectController. You can copy/paste one of the and edit it just for testing this feature
Sorry, I have just seen that Tom already requested it |
@JorTurFer Thanks for the example! I've not forgotten about this PR. I will try to make this today. |
@JorTurFer I'm not a pro in a go test but I've tried to add a test for this function. Can you look at it, please? Also, I've not found any guide on how to run these tests locally. |
Signed-off-by: Sergey Shevchenko <shevchenko@simple.life>
751ac8d
to
fdcf8f8
Compare
Ok, looks like it's working. @tomkerkhove @JorTurFer Can you look at this again? |
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 for this contribution ❤️
BTW @sergeyshevch, you can run unit test using go command directly, but the easiest way is running |
@JorTurFer Yeah, I found it. But it requires local installation of k8s) |
For make test? Are you sure? |
In theory, you don't need local cluster for it. |
@JorTurFer Sorry for following up in this thread. When the next release is planned? I want to get this patch into production in some time. |
hi @sergeyshevch |
Provide a description of what has been changed
Now annotations from ScaledObject will be applied to HPA.
Use Case:
We validate HPA for the required set of annotations. And our Scaled object contains such annotations but it doesn't reflect it to HPA
Checklist
Fixes #