• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kubeovn / kube-ovn / 24824233761
25%
master: 25%

Build:
Build:
LAST BUILD BRANCH: ovn-central-controller
DEFAULT BRANCH: master
Ran 23 Apr 2026 08:11AM UTC
Jobs 1
Files 206
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

23 Apr 2026 08:06AM UTC coverage: 24.555% (+0.004%) from 24.551%
24824233761

push

github

oilbeater
fix(vpcnatgw): keep eth0 on primary CNI in non-primary CNI mode (#6675)

* fix(vpcnatgw): keep eth0 on primary CNI in non-primary CNI mode

PR #6212 forced v1.multus-cni.io/default-network onto the NAT gateway pod
whenever gw.Spec.Subnet used a custom provider. That is correct when
Kube-OVN is the primary CNI, but when --non-primary-cni-mode is enabled
(e.g. Harvester attaching a tenant OVN overlay), eth0 is supposed to sit
on the cluster's primary CNI (Calico) so the pod can reach the control
plane and keep a working default route. Overriding default-network with
the tenant NAD caused eth0 to attach to the tenant subnet, breaking VM
external connectivity through the NAT gateway.

Skip the default-network override when the controller runs as a
non-primary CNI. Primary CNI behaviour, including the fix from #6212, is
unchanged.

Fixes #6632

Co-authored-by: SKALA NETWORKS <127797154+SkalaNetworks@users.noreply.github.com>
Signed-off-by: Mengxin Liu <liumengxinfly@gmail.com>

* fix(vpcnatgw): validate custom provider regardless of CNI mode

Address Copilot reviewer feedback on PR #6675: the previous combined
condition `p != OvnProvider && !enableNonPrimaryCNI` bypassed the
`name.namespace.ovn` format check in non-primary CNI mode, which would
silently produce malformed LogicalSwitch/IPAddress annotation keys if a
subnet somehow carried a bad provider string.

Split the branch so that custom providers are always validated, but the
`v1.multus-cni.io/default-network` override is still only applied under
primary CNI mode. Add a unit test case covering invalid provider syntax
under non-primary CNI.

Co-authored-by: SKALA NETWORKS <127797154+SkalaNetworks@users.noreply.github.com>
Signed-off-by: Mengxin Liu <liumengxinfly@gmail.com>

---------

Signed-off-by: Mengxin Liu <liumengxinfly@gmail.com>
Co-authored-by: SKALA NETWORKS <127797154+SkalaNetworks@users.noreply.github.com>

8 of 9 new or added lines in 2 files covered. (88.89%)

13813 of 56254 relevant lines covered (24.55%)

0.29 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
3.41
0.0% pkg/controller/vpc_nat_gateway.go
Jobs
ID Job ID Ran Files Coverage
1 24824233761.1 23 Apr 2026 08:11AM UTC 206
24.55
GitHub Action Run
Source Files on build 24824233761
  • Tree
  • List 206
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • d466eded on github
  • Prev Build on release-1.16 (#24763132026)
  • Next Build on release-1.16 (#24831150934)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc