-
Notifications
You must be signed in to change notification settings - Fork 60
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: basic implementation for inclusions #445
Conversation
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 the PR! I definitely think it would be a nice feature to add an include list!
@davidebianchi I pushed some changes to allow both inclusions and exclusions. I also added some tests but if you need more test coverage just let me know. I specifically included a test case where the inclusion is set with a label but the resource is excluded based on its name. It passes the tests. I'll be waiting your review! |
Pull Request Test Coverage Report for Build 9554721163Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 9554727447Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 9554747820Details
💛 - Coveralls |
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 the enhancement, really useful! Some comments. Can you add also an e2e test on the include feature?
Pull Request Test Coverage Report for Build 9648970109Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 9653084867Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 9658054514Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 9658225371Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 9677983397Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 9678156387Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 9679613368Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 9679799079Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 9680074655Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 9682276028Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 9682616964Details
💛 - Coveralls |
@davidebianchi I did but I guess either sth is wrong with my implementation because e2e tests do not work for inclusion setup. However, all the unit tests I have added passes. So maybe sth else needs to be configured to support this. Do you see anything that might be breaking e2e tests? Asking cause the logic is quite simple. |
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.
In this way, test should run. In this assert, instead of wait until resources are stopped, it is ok to check only that the manifest is changed accordingly.
Co-authored-by: Davide Bianchi <10374360+davidebianchi@users.noreply.github.com>
Pull Request Test Coverage Report for Build 9730538422Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 9730783899Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 9732699504Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 9732731287Details
💛 - Coveralls |
@davidebianchi all the requested changes are implemented. I believe it should be fine to merge now. Looking forward to use this in production! |
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.
Only a small change! It should also be removed the ExcludeRef struct. Once removed, run make generate
to update the autogenerated files
Pull Request Test Coverage Report for Build 9757326940Details
💛 - Coveralls |
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.
Great, thank you for your work! LGTM
Awesome! If you can make an rc release when appropriate, that'd be great! |
@davidebianchi how do you feel about adding support for inclusion rules? I think it might be useful for some teams/companies where they have to use some independent services in the same namespaces. At least for my team, this is definitely the case.
If you find it ok, I'll add tests and complete the PR. I wanted to get your opinion first.