forked from ovn-kubernetes/ovn-kubernetes
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Consolidate several L4 OVN ACLs into smaller number of OVN ACLs
If an ingress rule has 5 TCP port specified along with a namespace selector, then we end up creating 5 OVN ACLs. Instead, we could create just one ACL by consoldiating the individual ports and/or ranges. For example: With this Network Policy, spec: ingress: - from: - nameSelector: matchLabels: name: web ports: - protocol: TCP port: 3306 - protocol: TCP port: 80 - protocol: TCP port: 9000 endPort: 9100 we end up creating following 3 matches (ip4.src == {$as1} && tcp && tcp.dst==3306 && outport == @pg1) (ip4.src == {$as1} && tcp && tcp.dst==80 && outport == @pg1) (ip4.src == {$as1} && tcp && 9000<=tcp.dst<=9100 && outport == @pg1) With the fix in this commit, we will have only one match (ip4.src == {$as1} && tcp && (tcp.dst=={3306,80} || \ 9000<=tcp.dst<=9100 && outport == @pg1) With reduced number of OVN ACLs will result in fewer logical flows and few OpenFlow flows Signed-off-by: Xiaobin Qu <[email protected]> Co-authored-by: Girish Moodalbail <[email protected]>
- Loading branch information
Showing
6 changed files
with
241 additions
and
74 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
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
Oops, something went wrong.