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

stacklok / toolhive / 19312047856
51%

Build:
DEFAULT BRANCH: main
Ran 12 Nov 2025 09:18PM UTC
Jobs 1
Files 382
Run time 8min
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

12 Nov 2025 09:12PM UTC coverage: 49.006% (+0.09%) from 48.921%
19312047856

push

github

web-flow
Consolidate Kubernetes client utilities into pkg/k8s (#2560)

Consolidate Kubernetes client utilities

Move Kubernetes client creation and configuration utilities from
pkg/container/kubernetes to a new common package pkg/k8s. This
enables other packages to reuse these utilities without creating
circular dependencies.

Changes:
- Created pkg/k8s package with config, namespace, and client utilities
- Added three client creation functions for different use cases:
  * NewClient() for standard Kubernetes clientset
  * NewControllerRuntimeClient() for CRD-aware controller-runtime clients
  * NewDynamicClient() for dynamic/unstructured resource access
- Migrated pkg/container/kubernetes, pkg/groups, and operator to use pkg/k8s
- Removed duplicate namespace detection code
- Separated I/O operations from pure logic for better testability
- Added comprehensive test coverage with parallel-safe tests

Benefits:
- Single source of truth for Kubernetes client operations
- Eliminates code duplication across packages
- Better architecture with proper separation of concerns
- Improved testability with 100% test coverage of logic functions
- No circular dependencies between packages

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>

75 of 160 new or added lines in 7 files covered. (46.88%)

1 existing line in 1 file now uncovered.

24239 of 49461 relevant lines covered (49.01%)

35.68 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
90.2
0.0% pkg/container/kubernetes/configmap.go
2
0.0
0.0% cmd/thv-operator/pkg/controllerutil/platform.go
3
0.0
0.0% pkg/groups/manager.go
5
30.24
0.84% pkg/container/kubernetes/client.go
11
67.65
pkg/k8s/config.go
30
40.0
pkg/k8s/client.go
33
47.62
pkg/k8s/namespace.go

Uncovered Existing Lines

Lines Coverage ∆ File
1
30.24
0.84% pkg/container/kubernetes/client.go
Jobs
ID Job ID Ran Files Coverage
1 19312047856.1 12 Nov 2025 09:18PM UTC 382
49.01
GitHub Action Run
Source Files on build 19312047856
  • Tree
  • List 382
  • Changed 5
  • Source Changed 4
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #19312047856
  • f726d52f on github
  • Prev Build on main (#19311403055)
  • Next Build on main (#19314204224)
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

© 2025 Coveralls, Inc