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

kubeovn / kube-ovn / 22339974249
23%
master: 23%

Build:
Build:
LAST BUILD BRANCH: renovate/master-github.com-cert-manager-cert-manager-1.x
DEFAULT BRANCH: master
Ran 24 Feb 2026 06:53AM UTC
Jobs 1
Files 204
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

24 Feb 2026 06:50AM UTC coverage: 23.118% (+0.06%) from 23.055%
22339974249

Pull #6328

github

oilbeater
refactor(controller): reduce duplication and complexity in pod.go

Extract shared utility functions and split oversized functions to
improve readability and maintainability without changing behavior.

Phase 1 - Extract utility functions:
- checkStatefulSetPodStatus: unify isStatefulSetPodToDel/isStatefulSetPodToGC
- movePortToPortGroup: deduplicate 3 port group move operations
- acquireRandomAddressWithValidation: deduplicate 2 random IP loops
- subnetHasAvailableIPs: simplify switch/fallthrough logic
- podAllocatedChanged: deduplicate NP/ANP allocated checks
- Reuse existing getIPSuffix from subnet.go

Phase 2 - Split long functions:
- reconcileRouteSubnets (275→~50 lines): extract handleOverlaySubnetRoute,
  handleEipSnatRoute, handleEipSnatNatRules
- handleDeletePod (230→~80 lines): extract cleanupPodPolicyRoutesAndNAT,
  cleanupPodIPCRs
- getPodAttachmentNet (185→~50 lines): extract resolveDeletedNADSubnet,
  resolveOVNAttachmentNet, buildOVNProviderName, findSubnetByProvider
- acquireAddress: extract resolveMAC

Phase 3 - Minor cleanups:
- Extract enqueuePodDeletion helper
- Remove unused pod parameter from handleEipSnatRoute

Signed-off-by: Mengxin Liu <liumengxinfly@gmail.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Mengxin Liu <liumengxinfly@gmail.com>
Pull Request #6328: refactor(controller): reduce duplication and complexity in pod.go

49 of 413 new or added lines in 1 file covered. (11.86%)

17 existing lines in 1 file now uncovered.

12554 of 54305 relevant lines covered (23.12%)

0.27 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
364
11.39
1.47% pkg/controller/pod.go

Uncovered Existing Lines

Lines Coverage ∆ File
17
11.39
1.47% pkg/controller/pod.go
Jobs
ID Job ID Ran Files Coverage
1 22339974249.1 24 Feb 2026 06:53AM UTC 204
23.12
GitHub Action Run
Source Files on build 22339974249
  • Tree
  • List 204
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #6328
  • PR Base - master (#22338892784)
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