Skip to content

Commit d9edac6

Browse files
yroblataskbot
andauthored
remove mixed mode to simplify vmcp operation (#2798)
* remove mixed mode to simplify vmcp operation * bump version --------- Co-authored-by: taskbot <taskbot@users.noreply.github.com>
1 parent 8dae561 commit d9edac6

File tree

14 files changed

+16
-179
lines changed

14 files changed

+16
-179
lines changed

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,7 @@ type OutgoingAuthConfig struct {
8585
// Source defines how backend authentication configurations are determined
8686
// - discovered: Automatically discover from backend's MCPServer.spec.externalAuthConfigRef
8787
// - inline: Explicit per-backend configuration in VirtualMCPServer
88-
// - mixed: Discover most, override specific backends
89-
// +kubebuilder:validation:Enum=discovered;inline;mixed
88+
// +kubebuilder:validation:Enum=discovered;inline
9089
// +kubebuilder:default=discovered
9190
// +optional
9291
Source string `json:"source,omitempty"`
@@ -96,7 +95,7 @@ type OutgoingAuthConfig struct {
9695
Default *BackendAuthConfig `json:"default,omitempty"`
9796

9897
// Backends defines per-backend authentication overrides
99-
// Works in all modes (discovered, inline, mixed)
98+
// Works in all modes (discovered, inline)
10099
// +optional
101100
Backends map[string]BackendAuthConfig `json:"backends,omitempty"`
102101
}

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,9 @@ func (r *VirtualMCPServer) validateOutgoingAuth() error {
102102
validSources := map[string]bool{
103103
"discovered": true,
104104
"inline": true,
105-
"mixed": true,
106105
}
107106
if auth.Source != "" && !validSources[auth.Source] {
108-
return fmt.Errorf("spec.outgoingAuth.source must be one of: discovered, inline, mixed")
107+
return fmt.Errorf("spec.outgoingAuth.source must be one of: discovered, inline")
109108
}
110109

111110
// Validate backend configurations

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ func TestVirtualMCPServerValidate(t *testing.T) {
5858
},
5959
},
6060
wantErr: true,
61-
errMsg: "spec.outgoingAuth.source must be one of: discovered, inline, mixed",
61+
errMsg: "spec.outgoingAuth.source must be one of: discovered, inline",
6262
},
6363
{
6464
name: "valid backend external auth config ref",

cmd/thv-operator/controllers/virtualmcpserver_vmcpconfig_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,14 +111,14 @@ func TestConvertOutgoingAuth(t *testing.T) {
111111
{
112112
name: "with per-backend auth",
113113
outgoingAuth: &mcpv1alpha1.OutgoingAuthConfig{
114-
Source: "mixed",
114+
Source: "discovered",
115115
Backends: map[string]mcpv1alpha1.BackendAuthConfig{
116116
"backend-1": {
117117
Type: mcpv1alpha1.BackendAuthTypeDiscovered,
118118
},
119119
},
120120
},
121-
expectedSource: "mixed",
121+
expectedSource: "discovered",
122122
hasDefault: false,
123123
backendCount: 1,
124124
},
@@ -514,7 +514,7 @@ func TestYAMLMarshalingDeterminism(t *testing.T) {
514514
},
515515
// OutgoingAuth with Backends map
516516
OutgoingAuth: &mcpv1alpha1.OutgoingAuthConfig{
517-
Source: "mixed",
517+
Source: "discovered",
518518
Backends: map[string]mcpv1alpha1.BackendAuthConfig{
519519
"backend-zebra": {
520520
Type: mcpv1alpha1.BackendAuthTypeDiscovered,

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.71
5+
version: 0.0.72
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,6 +1,6 @@
11
# ToolHive Operator CRDs Helm Chart
22

3-
![Version: 0.0.71](https://img.shields.io/badge/Version-0.0.71-informational?style=flat-square)
3+
![Version: 0.0.72](https://img.shields.io/badge/Version-0.0.72-informational?style=flat-square)
44
![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
55

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

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ spec:
612612
type: object
613613
description: |-
614614
Backends defines per-backend authentication overrides
615-
Works in all modes (discovered, inline, mixed)
615+
Works in all modes (discovered, inline)
616616
type: object
617617
default:
618618
description: Default defines default behavior for backends without
@@ -645,11 +645,9 @@ spec:
645645
Source defines how backend authentication configurations are determined
646646
- discovered: Automatically discover from backend's MCPServer.spec.externalAuthConfigRef
647647
- inline: Explicit per-backend configuration in VirtualMCPServer
648-
- mixed: Discover most, override specific backends
649648
enum:
650649
- discovered
651650
- inline
652-
- mixed
653651
type: string
654652
type: object
655653
podTemplateSpec:

docs/operator/crd-api.md

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/operator/virtualmcpserver-api.md

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ Configures authentication from Virtual MCP to backend MCPServers.
8080
- `source` (string, optional): How backend authentication configurations are determined
8181
- `discovered` (default): Automatically discover from backend's `MCPServer.spec.externalAuthConfigRef`
8282
- `inline`: Explicit per-backend configuration in VirtualMCPServer
83-
- `mixed`: Discover most, override specific backends
8483
- `default` (BackendAuthConfig, optional): Default behavior for backends without explicit auth config
8584
- `backends` (map[string]BackendAuthConfig, optional): Per-backend authentication overrides
8685

@@ -113,27 +112,6 @@ spec:
113112
headerFormat: "Bearer {token}"
114113
```
115114

116-
**Example (mixed mode)**:
117-
```yaml
118-
spec:
119-
outgoingAuth:
120-
source: mixed
121-
default:
122-
type: discovered
123-
backends:
124-
# Override specific backends while others use discovery
125-
slack:
126-
type: service_account
127-
serviceAccount:
128-
credentialsRef:
129-
name: slack-bot-override
130-
key: token
131-
headerName: Authorization
132-
headerFormat: "Bearer {token}"
133-
# Other backends (github, jira, etc.) will automatically
134-
# discover auth config from their MCPServer.spec.externalAuthConfigRef
135-
```
136-
137115
#### BackendAuthConfig
138116

139117
**Fields**:

docs/proposals/THV-2106-virtual-mcp-server.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ spec:
593593
# ===== OUTGOING AUTHENTICATION (Virtual MCP → Backends) =====
594594
outgoingAuth:
595595
# Configuration source
596-
source: discovered # inline | discovered | mixed
596+
source: discovered # inline | discovered
597597
598598
# When source=discovered:
599599
# Virtual MCP queries each backend's MCPServer.spec.externalAuthConfigRef

0 commit comments

Comments
 (0)