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

qiniu / kube-ovn / 23175574184

17 Mar 2026 02:26AM UTC coverage: 23.449% (+0.5%) from 22.981%
23175574184

push

github

web-flow
fix(controller): backfill nat gateway lan ip safely (#6424)

* fix(controller): backfill nat gateway lan ip and sync status

Backfill spec.lanIp from the running NAT gateway pod using StatefulSet owner references. Also mirror spec.lanIp into status and add tests for both behaviors.

Signed-off-by: jimyag <git@jimyag.com>

* refactor(controller): remove nat gateway status lanIp sync

Keep lanIp as a spec-only field for VpcNatGateway.
Remove redundant status.lanIp updates and related unit test coverage.

Signed-off-by: jimyag <git@jimyag.com>

* fix(controller): guard nat gw lanIp backfill when lister is nil

Fallback to direct API get when vpcNatGatewayLister is not initialized.
This prevents nil pointer panics in lanIp backfill test scenarios.

Signed-off-by: jimyag <git@jimyag.com>

* fix(controller): harden nat gw lanIp backfill checks

Restrict lanIp backfill to controller namespace pods and validate parsed IP values before patching.
Also simplify owner name guard logic and expand unit coverage for namespace and invalid-ip cases.

Signed-off-by: jimyag <git@jimyag.com>

* fix(controller): select nat gw lan ip by subnet protocol

Choose backfilled lanIp using subnet protocol to avoid preferring IPv4 on IPv6 subnets.
Add unit coverage for IPv6 subnet backfill behavior.

Signed-off-by: jimyag <git@jimyag.com>

* style(test): fix gofumpt formatting in pod backfill test

Apply gofumpt formatting to TestBackfillVpcNatGwLanIPFromPod setup block.
This matches CI lint expectations for Build kube-ovn.

Signed-off-by: jimyag <git@jimyag.com>

* fix(controller): trigger nat gateway reconcile from pod updates only

Limit VpcNatGateway reconcile trigger to NAT gateway pod update paths.
Remove parent enqueue logic from EIP/FIP/DNAT/SNAT child resource enqueue handlers.
Keep lanIP backfill in parent reconcile.

Signed-off-by: jimyag <git@jimyag.com>

* chore(controller): revert non-functional nat gw handler refactors

Signed-off-by: jimyag <git@jimyag.com>

------... (continued)

56 of 103 new or added lines in 2 files covered. (54.37%)

3823 existing lines in 37 files now uncovered.

12883 of 54941 relevant lines covered (23.45%)

0.27 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/pkg/daemon/tproxy_linux.go


Source Not Available

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