-
Notifications
You must be signed in to change notification settings - Fork 128
feat(offload): Add the liqoctl offload namespaces command. #3060
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
Conversation
|
Hi @mayooot. Thanks for your PR! I am @adamjensenbot.
Make sure this PR appears in the liqo changelog, adding one of the following labels:
|
|
This looks very good to me, thanks! |
|
@claudiolor Please check it. |
|
Hi @mayooot thank you so much for your PR :D I would not create a new command with a single letter of difference to another as it seems to me really prone to user errors, while instead I would reuse the same command with some aliases so that Of course, we should return an error if the user specified both the name of the namespaces of the label selectors or none of them. In this way I think we are reducing the possibility that a user makes a mistake, we are giving the possibility to offload more than one namespace by name at a time and there is no need to duplicate code in order to introduce a new command. |
|
@claudiolor You're right, It's right to make changes to the I will update the code as we discussed. |
|
@claudiolor I've done that. $ liqoctl offload namespace lowkey01
INFO Offloading of namespace "lowkey01" correctly enabled
INFO Offloading completed successfully
$ liqoctl offload namespace lowkey02 lowkey03 lowkey04
INFO Offloading of namespace "lowkey02" correctly enabled
INFO Offloading completed successfully
INFO Offloading of namespace "lowkey03" correctly enabled
INFO Offloading completed successfully
INFO Offloading of namespace "lowkey04" correctly enabled
INFO Offloading completed successfully
$ liqoctl offload namespace --label-selector="bunch=yes"
INFO Offloading of namespace "highkey01" correctly enabled
INFO Offloading completed successfully
INFO Offloading of namespace "highkey02" correctly enabled
INFO Offloading completed successfully
INFO Offloading of namespace "highkey03" correctly enabled
INFO Offloading completed successfully |
|
Hi @mayooot thanks a lot! :) I will check it ASAP |
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.
Overall the PR is ok, just a couple of comments that need to be addressed
|
@mayooot This looks very good to me (@claudiolor for more precise notes on the code).
|
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.
Some changes needs to be done as:
- The manifest output is broken (the namespace name is not provided so everything is created in the default namespace)
- We need to add an additional check to avoid that
--remote-namespace-nameis provided when multiple namespace are targeted for offloading
Once these changes are done I believe the code of the offload command can be considered complete :)
|
@claudiolor All done. Cloud you check it when you have a moment? |
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.
Thank you for fixing the issues I reported! π―
Once the small issue I underlined is fixed we can consider the offload command completed.
To merge this PR we still need to implement a similar behavior with the unoffload command and the documentation needs to be updated accordingly.
Ok, I've fixed the bugs, and I'll implement unoffload command ASAP. |
|
@claudiolor All is done. Please check it and let me know your suggestions about the code and docs :) |
|
Thanks @mayooot, I will check these changes ASAP |
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.
Thank you for implementing also unoffload!
- I left just a couple of comment.
- Before merging we also need to update the automatically generated
liqoctldocumentation, you can update the documentation by launchingmake ctldocs, then you can commit the updated files.
Once those two points are addressed I believe we can merge
@claudiolor I'm done here :) |
|
/test |
1 similar comment
|
/test |
|
Hi @mayooot! It looks good to me. Could you please squash all your commits into a single commit? Then we can proceed with the merge. Thanks! |
Sure, I just squashed them. |
|
/rebase test=true |
|
/merge |
Multiple namespaces can be offloaded.
Description
Added the liqoctl offload namespaces command. Matching namespaces can be found using
--label-selector.Fixes #(issue)
#3057
How Has This Been Tested?
Yes, I hava tested it locally.