Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Combine together ports of the same protocol
When converting k8s network policies to calico policies, we currently create one calico rule per port x peer combination. Instead, we should probably create one rule per protocol x peer combination, and combine together ports of the same protocol. As normal, no ports leads to allowing any port and any protocol. The existing behaviour is that any empty port struct, even in a list with other ports, will lead to the creation of a rule that allows all ports. Currently we also create other rules for other ports, but this seems pointless.
- Loading branch information
1 parent
988e024
commit ad2aabb
Showing
2 changed files
with
142 additions
and
47 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