Repository navigation
Operator: Change default proxy mode from SSE to streamable-http - #2521
Conversation
Update the Kubernetes Operator to default to streamable-http proxy mode instead of the deprecated SSE transport for stdio-based MCP servers. Changes: - Update CRD default annotation from sse to streamable-http - Update controller default logic to use streamable-http - Update unit tests to expect streamable-http as default - Regenerate CRD manifests and documentation - Bump operator-crds chart version from 0.0.52 to 0.0.53 - Bump operator chart version from 0.3.7 to 0.3.8 - Add explicit proxyMode: sse to existing stdio e2e tests - Add new stdio-streamable-http e2e test scenarios for both single-tenancy and multi-tenancy The streamable-http transport is the recommended approach per the MCP specification. Users can still explicitly set proxyMode: sse if needed. Fixes #2211 Signed-off-by: Dan Barr <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2521 +/- ##
==========================================
- Coverage 55.69% 55.68% -0.02%
==========================================
Files 295 295
Lines 28031 28031
==========================================
- Hits 15611 15608 -3
- Misses 10998 11000 +2
- Partials 1422 1423 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull Request Overview
This PR changes the default proxyMode for stdio transport from sse to streamable-http in the MCPServer CRD. The change affects the operator's default behavior when users don't explicitly specify a proxy mode.
- Updated the default proxy mode from
ssetostreamable-httpacross API types, CRD definitions, controller logic, and documentation - Added comprehensive E2E tests for the new
stdio-streamable-httpconfiguration in both single-tenancy and multi-tenancy scenarios - Updated existing
stdiotests to explicitly setproxyMode: sseto maintain test coverage for the SSE functionality
Reviewed Changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| cmd/thv-operator/api/v1alpha1/mcpserver_types.go | Changed kubebuilder default annotation for proxyMode from sse to streamable-http |
| cmd/thv-operator/controllers/mcpserver_runconfig.go | Updated default value logic and comment to use streamable-http instead of sse |
| cmd/thv-operator/controllers/mcpserver_runconfig_test.go | Updated test name and assertions to validate new streamable-http default |
| deploy/charts/operator-crds/crds/toolhive.stacklok.dev_mcpservers.yaml | Updated CRD default value for proxyMode to streamable-http |
| deploy/charts/operator-crds/Chart.yaml | Bumped chart version from 0.0.52 to 0.0.53 |
| deploy/charts/operator-crds/README.md | Updated version badge to reflect new chart version 0.0.53 |
| deploy/charts/operator/Chart.yaml | Bumped chart version from 0.3.7 to 0.3.8 |
| deploy/charts/operator/README.md | Updated version badge to reflect new chart version 0.3.8 |
| docs/operator/crd-api.md | Updated API documentation to reflect new default value streamable-http |
| test/e2e/chainsaw/operator/single-tenancy/test-scenarios/stdio/mcpserver.yaml | Explicitly set proxyMode: sse to maintain SSE test coverage |
| test/e2e/chainsaw/operator/single-tenancy/test-scenarios/stdio-streamable-http/mcpserver.yaml | New test configuration for streamable-http proxy mode |
| test/e2e/chainsaw/operator/single-tenancy/test-scenarios/stdio-streamable-http/chainsaw-test.yaml | New E2E test suite for stdio with streamable-http proxy mode |
| test/e2e/chainsaw/operator/single-tenancy/test-scenarios/stdio-streamable-http/assert-*.yaml | New assertion files for streamable-http test scenario |
| test/e2e/chainsaw/operator/multi-tenancy/test-scenarios/stdio/mcpserver.yaml | Explicitly set proxyMode: sse to maintain SSE test coverage |
| test/e2e/chainsaw/operator/multi-tenancy/test-scenarios/stdio-streamable-http/mcpserver.yaml | New test configuration for multi-tenancy streamable-http proxy mode |
| test/e2e/chainsaw/operator/multi-tenancy/test-scenarios/stdio-streamable-http/chainsaw-test.yaml | New E2E test suite for multi-tenancy stdio with streamable-http proxy mode |
| test/e2e/chainsaw/operator/multi-tenancy/test-scenarios/stdio-streamable-http/assert-*.yaml | New assertion files for multi-tenancy streamable-http test scenario |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ChrisJBurns
left a comment
There was a problem hiding this comment.
Would we have to also modify the existing e2e tests so that they make sure to send the correct transport type request to the correct proxy mode? For example, single-tenancy/sse has no proxyMode which means its now defaulted to streamable-http but the test fires sse transport requests
|
Signed-off-by: Dan Barr <[email protected]>
|
@danbarr This makes sense, and also explains why the e2e tests for those scenarios pass (when I thought they'd fail) |
Summary
Changes the Kubernetes Operator default proxy mode from the deprecated
ssetostreamable-httpfor stdio-based MCP servers. The streamable-http transport is the recommended approach per the MCP specification.Fixes #2211
Changes
Core Changes
cmd/thv-operator/api/v1alpha1/mcpserver_types.go): Updated kubebuilder default annotation fromssetostreamable-httpcmd/thv-operator/controllers/mcpserver_runconfig.go): Changed default proxy mode with updated comment explaining SSE deprecationcmd/thv-operator/controllers/mcpserver_runconfig_test.go): Updated test expectations and assertionsGenerated Files
deploy/charts/operator-crds/crds/toolhive.stacklok.dev_mcpservers.yaml)docs/operator/crd-api.md)Version Bumps
0.0.52→0.0.530.3.7→0.3.8E2E Test Updates
Existing stdio tests - Added explicit
proxyMode: sseto preserve original test behavior:test/e2e/chainsaw/operator/single-tenancy/test-scenarios/stdio/test/e2e/chainsaw/operator/multi-tenancy/test-scenarios/stdio/New streamable-http tests - Complete test coverage for the new default:
test/e2e/chainsaw/operator/single-tenancy/test-scenarios/stdio-streamable-http/test/e2e/chainsaw/operator/multi-tenancy/test-scenarios/stdio-streamable-http/Both test scenarios validate:
Impact
Breaking Change
This is a breaking change for users who rely on the default SSE behavior without explicitly setting
proxyMode.Migration path: Users who need to continue using SSE can explicitly set it in their MCPServer resources:
Benefits
Testing
Related