Skip to content

Commit b797d89

Browse files
authored
Operator: Change default proxy mode from SSE to streamable-http (#2521)
* Change default proxy mode from SSE to streamable-http 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]> * Bump operator chart to 0.4.0 Signed-off-by: Dan Barr <[email protected]> --------- Signed-off-by: Dan Barr <[email protected]> Co-authored-by: Dan Barr <[email protected]>
1 parent 6ee9c58 commit b797d89

23 files changed

+382
-10
lines changed

cmd/thv-operator/api/v1alpha1/mcpserver_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ type MCPServerSpec struct {
6161
// ProxyMode is the proxy mode for stdio transport (sse or streamable-http)
6262
// This setting is only used when Transport is "stdio"
6363
// +kubebuilder:validation:Enum=sse;streamable-http
64-
// +kubebuilder:default=sse
64+
// +kubebuilder:default=streamable-http
6565
// +optional
6666
ProxyMode string `json:"proxyMode,omitempty"`
6767

cmd/thv-operator/controllers/mcpserver_runconfig.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ func (r *MCPServerReconciler) createRunConfigFromMCPServer(m *mcpv1alpha1.MCPSer
123123

124124
proxyMode := m.Spec.ProxyMode
125125
if proxyMode == "" {
126-
proxyMode = "sse" // Default to SSE for backward compatibility
126+
proxyMode = "streamable-http" // Default to streamable-http (SSE is deprecated)
127127
}
128128

129129
options := []runner.RunConfigBuilderOption{

cmd/thv-operator/controllers/mcpserver_runconfig_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ func TestCreateRunConfigFromMCPServer(t *testing.T) {
186186
},
187187
},
188188
{
189-
name: "proxy mode defaults to sse when not specified",
189+
name: "proxy mode defaults to streamable-http when not specified",
190190
mcpServer: &mcpv1alpha1.MCPServer{
191191
ObjectMeta: metav1.ObjectMeta{
192192
Name: "default-proxy-mode-server",
@@ -205,7 +205,7 @@ func TestCreateRunConfigFromMCPServer(t *testing.T) {
205205
assert.Equal(t, testImage, config.Image)
206206
assert.Equal(t, transporttypes.TransportTypeStdio, config.Transport)
207207
assert.Equal(t, 8080, config.Port)
208-
assert.Equal(t, transporttypes.ProxyModeSSE, config.ProxyMode, "Should default to sse")
208+
assert.Equal(t, transporttypes.ProxyModeStreamableHTTP, config.ProxyMode, "Should default to streamable-http")
209209
},
210210
},
211211
{

deploy/charts/operator-crds/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ apiVersion: v2
22
name: toolhive-operator-crds
33
description: A Helm chart for installing the ToolHive Operator CRDs into Kubernetes.
44
type: application
5-
version: 0.0.52
5+
version: 0.0.53
66
appVersion: "0.0.1"

deploy/charts/operator-crds/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
# ToolHive Operator CRDs Helm Chart
33

4-
![Version: 0.0.52](https://img.shields.io/badge/Version-0.0.52-informational?style=flat-square)
4+
![Version: 0.0.53](https://img.shields.io/badge/Version-0.0.53-informational?style=flat-square)
55
![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
66

77
A Helm chart for installing the ToolHive Operator CRDs into Kubernetes.

deploy/charts/operator-crds/crds/toolhive.stacklok.dev_mcpservers.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ spec:
344344
minimum: 1
345345
type: integer
346346
proxyMode:
347-
default: sse
347+
default: streamable-http
348348
description: |-
349349
ProxyMode is the proxy mode for stdio transport (sse or streamable-http)
350350
This setting is only used when Transport is "stdio"

deploy/charts/operator/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ apiVersion: v2
22
name: toolhive-operator
33
description: A Helm chart for deploying the ToolHive Operator into Kubernetes.
44
type: application
5-
version: 0.3.7
5+
version: 0.4.0
66
appVersion: "0.5.2"

deploy/charts/operator/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
# ToolHive Operator Helm Chart
33

4-
![Version: 0.3.7](https://img.shields.io/badge/Version-0.3.7-informational?style=flat-square)
4+
![Version: 0.4.0](https://img.shields.io/badge/Version-0.4.0-informational?style=flat-square)
55
![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
66

77
A Helm chart for deploying the ToolHive Operator into Kubernetes.

docs/operator/crd-api.md

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
apiVersion: apps/v1
2+
kind: StatefulSet
3+
metadata:
4+
name: yardstick
5+
namespace: test-namespace
6+
status:
7+
availableReplicas: 1

0 commit comments

Comments
 (0)