-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
egressgw: improve installation of IP rules
route.ReplaceRule() internally fetches the whole set of IP rules in the system. So calling addEgressIpRule() for every EgressGW-eligible endpoint causes quite a bit of churn. Instead fetch the rules just once per EgressGW policy (filtered for the policy's routing table). Then check for each of the policy's endpoints whether its IP rule already exists, and insert any rule that is missing. Note that there is further potential for improvement here - ideally we would fetch the whole rule set just once, dynamically filter it down to each policy's routing table, and only match the policy's endpoints against those specific rules. Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
- Loading branch information
1 parent
d5ee4e7
commit fabbc5d
Showing
2 changed files
with
78 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters