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

stacklok / toolhive / 18688428579
59%

Build:
DEFAULT BRANCH: main
Ran 21 Oct 2025 03:11PM UTC
Jobs 1
Files 284
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

21 Oct 2025 03:06PM UTC coverage: 47.621% (+0.3%) from 47.367%
18688428579

push

github

web-flow
Add Kubernetes export format to thv export command (#2072)

* Add Kubernetes export format to thv export command

Add support for exporting MCP server configurations as Kubernetes
MCPServer resources with the --format flag. Users can now export
their running servers to K8s manifests for deployment in Kubernetes.

Changes:
- Add pkg/export package with k8s.go for converting RunConfig to MCPServer CRD
- Enhance thv export command with --format flag (json/k8s)
- Convert all RunConfig fields to appropriate MCPServer spec fields
- Handle environment variables, volumes, OIDC, authz, audit, telemetry
- Sanitize names to comply with Kubernetes naming requirements
- Add comprehensive unit tests for all export functionality
- Add e2e tests for export command with both formats

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

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Juan Antonio Osorio <ozz@stacklok.com>

* Address PR feedback for k8s export format

Fix issues identified in PR review:

1. Fix APIVersion from toolhive.stacklok.com to toolhive.stacklok.dev
   - Update pkg/export/k8s.go to use correct API group
   - Update test assertions in pkg/export/k8s_test.go and test/e2e/export_test.go

2. Add validation for remote MCP servers
   - Remote servers are not supported in Kubernetes deployments
   - Return error if RemoteURL is set or Image is empty
   - Add unit tests for both error cases

3. Add warning for servers with secrets
   - Detect when secrets are present in RunConfig
   - Output warning to stderr explaining secrets must be created separately
   - Display list of secrets that need to be handled

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

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Signed-off-by: Juan Antonio Osorio <ozz@stacklok.com>
Co-authored-by: Claude <noreply@anthropic.com>

165 of 203 new or added lines in 3 files covered. (81.28%)

4 existing lines in 3 files now uncovered.

18453 of 38750 relevant lines covered (47.62%)

15.89 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
0.0
0.0% cmd/thv/app/version.go
2
98.8
pkg/export/k8s.go
35
0.0
0.0% cmd/thv/app/export.go

Uncovered Existing Lines

Lines Coverage ∆ File
1
0.0
0.0% cmd/thv/app/export.go
1
94.29
1.43% pkg/secrets/keyring/composite.go
2
81.62
0.0% pkg/transport/proxy/httpsse/http_proxy.go
Jobs
ID Job ID Ran Files Coverage
1 18688428579.1 21 Oct 2025 03:11PM UTC 284
47.62
GitHub Action Run
Source Files on build 18688428579
  • Tree
  • List 284
  • Changed 6
  • Source Changed 2
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #18688428579
  • 38b9a3f7 on github
  • Prev Build on main (#18688077172)
  • Next Build on main (#18688818084)
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