-
Notifications
You must be signed in to change notification settings - Fork 78
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
Skip InventoryPolicyApplyFilter for the AdoptAll
inventory policy to improve the performance
#422
Conversation
improve the performance Running InventoryPolicyApplyFilter involves getting every object in the current inventory from the live cluster, which can be expensive if the inventory includes lots of objects. If the inventory policy is `AdoptAll`, the current inventory can take ownership of any objects. Therefore, it is not necessary to run InventoryPolicyApplyFilter.
@haiyanmeng: GitHub didn't allow me to assign the following users: karlkfi. Note that only kubernetes-sigs members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time. |
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 looks good to me. I'll let others comment. If possible, a simple unit test would be nice.
This change does not change the generated Events. So I am not sure how to test it effectively. Any suggestions? |
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: haiyanmeng, seans3 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Running InventoryPolicyApplyFilter involves getting every object in the
current inventory from the live cluster, which can be expensive if the
inventory includes lots of objects.
If the inventory policy is
AdoptAll
, the current inventory can takeownership of any objects. Therefore, it is not necessary to run
InventoryPolicyApplyFilter.