Skip to content

feat(netpol): authorize l3 protocols#5745

Merged
oilbeater merged 5 commits intokubeovn:masterfrom
SkalaNetworks:fix-netpol
Oct 16, 2025
Merged

feat(netpol): authorize l3 protocols#5745
oilbeater merged 5 commits intokubeovn:masterfrom
SkalaNetworks:fix-netpol

Conversation

@SkalaNetworks
Copy link
Copy Markdown
Member

@SkalaNetworks SkalaNetworks commented Sep 22, 2025

Pull Request

What type of this PR

Examples of user facing changes:

  • Features
  • Bug fixes
  • Docs
  • Tests

Which issue(s) this PR fixes

Fixes #(issue-number)

@SkalaNetworks
Copy link
Copy Markdown
Member Author

I'll wait for #5741 to be merged to factorize the code

I'll also add a global switch to enable this or to keep the default behaviour. And also an annotation on NetworkPolicies to act as a toggle.

@SkalaNetworks SkalaNetworks force-pushed the fix-netpol branch 2 times, most recently from ab15e80 to fdf56c4 Compare September 22, 2025 13:38
@coveralls
Copy link
Copy Markdown

coveralls commented Sep 22, 2025

Pull Request Test Coverage Report for Build 18551492763

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 57 of 94 (60.64%) changed or added relevant lines in 3 files are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.06%) to 21.149%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/controller/config.go 0 2 0.0%
pkg/ovs/ovn-nb-acl.go 57 64 89.06%
pkg/controller/network_policy.go 0 28 0.0%
Files with Coverage Reduction New Missed Lines %
pkg/ovs/ovn-nb-bfd.go 2 61.61%
Totals Coverage Status
Change from base Build 18518503263: 0.06%
Covered Lines: 10731
Relevant Lines: 50740

💛 - Coveralls

Signed-off-by: SkalaNetworks <contact@skala.network>
Signed-off-by: SkalaNetworks <contact@skala.network>
Signed-off-by: SkalaNetworks <contact@skala.network>
Signed-off-by: SkalaNetworks <contact@skala.network>
@SkalaNetworks SkalaNetworks marked this pull request as ready for review October 15, 2025 18:57
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. feature New network feature network policy labels Oct 15, 2025
@SkalaNetworks
Copy link
Copy Markdown
Member Author

@oilbeater new PR to address the discussion we had on Slack

There's now a global controller switch and an annotation on network policies to configure the enforcement of network policies.

When the enforcement is "standard", everything works just like it always has: only what is in the policy is allowed, the rest is blocked (including ICMP)

When the enforcement is "lax", some protocols are excluded from being blocked. Those protocols are considered somewhat essential in a traditional network (especially one that has VMs in it): ARP/NDP (through ICMPv6)/ICMP/DHCP.

That setting is especially useful when using VMs through Kubevirt, as they may rely on DHCP to get their MTU/IP/DNS and more from Kubevirt or Kube-OVN. ICMP is unnecessary in the standard Kubernetes networking model, but very important for VMs to do PMTU discovery.

Signed-off-by: SkalaNetworks <contact@skala.network>
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Oct 16, 2025
@oilbeater oilbeater merged commit ddb5537 into kubeovn:master Oct 16, 2025
136 of 148 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New network feature lgtm This PR has been approved by a maintainer network policy size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants