You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Wire MCPOIDCConfig into VirtualMCPServer controller
VirtualMCPServer can now reference a shared MCPOIDCConfig resource via
incomingAuth.oidcConfigRef, matching the pattern already established for
MCPServer. The legacy inline oidcConfig field is deprecated and will be
removed in v1beta1.
Key changes:
- Add oidcConfigRef field to IncomingAuthConfig with CEL mutual-exclusivity
validation against the deprecated oidcConfig field
- Converter resolves OIDC config from MCPOIDCConfig references using
ResolveFromConfigRef, including client secret and CA bundle handling
- VirtualMCPServer controller validates the referenced MCPOIDCConfig,
tracks config hash changes, and watches for MCPOIDCConfig updates
- MCPOIDCConfig controller now tracks VirtualMCPServer references in
ReferencingWorkloads and blocks deletion while referenced
- Deployment builder propagates errors from MCPOIDCConfig fetch failures
rather than silently producing misconfigured deployments
Closes#4253Closes#4248
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: cmd/thv-operator/api/v1alpha1/virtualmcpserver_types.go
+18-4Lines changed: 18 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -109,21 +109,30 @@ type EmbeddingServerRef struct {
109
109
110
110
// IncomingAuthConfig configures authentication for clients connecting to the Virtual MCP server
111
111
//
112
-
// +kubebuilder:validation:XValidation:rule="self.type == 'oidc' ? has(self.oidcConfig) : true",message="spec.incomingAuth.oidcConfig is required when type is oidc"
112
+
// +kubebuilder:validation:XValidation:rule="self.type == 'oidc' ? (has(self.oidcConfig) || has(self.oidcConfigRef)) : true",message="spec.incomingAuth.oidcConfig or oidcConfigRef is required when type is oidc"
113
+
// +kubebuilder:validation:XValidation:rule="!(has(self.oidcConfig) && has(self.oidcConfigRef))",message="oidcConfig and oidcConfigRef are mutually exclusive; use oidcConfigRef to reference a shared MCPOIDCConfig"
113
114
//
114
-
//nolint:lll // CEL validation rule exceeds line length limit
115
+
//nolint:lll // CEL validation rules exceed line length limit
115
116
typeIncomingAuthConfigstruct {
116
117
// Type defines the authentication type: anonymous or oidc
117
118
// When no authentication is required, explicitly set this to "anonymous"
0 commit comments