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
- Add CEL XValidation rules for authzConfig/authzConfigRef mutual
exclusivity on MCPServerSpec, MCPRemoteProxySpec, and IncomingAuthConfig
- Add RBAC markers for watched workload resources (mcpservers,
virtualmcpservers, mcpremoteproxies)
- Replace mustMarshalJSON panic with error-returning marshalJSON
- Add nil-check on spec.Config.Raw before use in BuildFullAuthzConfigJSON
- Fix reconcile logic: call findReferencingWorkloads before hash-changed
check and return errors instead of swallowing them (matches
MCPTelemetryConfig pattern)
- Move authorizer backend blank imports from controller to main.go
- Add comment explaining why validateAuthzConfigSpec is standalone
- Add listMapKey=kind to ReferencingWorkloads for composite uniqueness
- Add tests for findReferencingWorkloads covering all workload types,
deletion blocking by VirtualMCPServer and MCPRemoteProxy, and empty
Config.Raw validation
- Regenerate CRD manifests
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: cmd/thv-operator/api/v1alpha1/mcpremoteproxy_types.go
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -38,6 +38,7 @@ type HeaderFromSecret struct {
38
38
// MCPRemoteProxySpec defines the desired state of MCPRemoteProxy
39
39
//
40
40
// +kubebuilder:validation:XValidation:rule="!(has(self.oidcConfig) && has(self.oidcConfigRef))",message="oidcConfig and oidcConfigRef are mutually exclusive; use oidcConfigRef to reference a shared MCPOIDCConfig"
41
+
// +kubebuilder:validation:XValidation:rule="!(has(self.authzConfig) && has(self.authzConfigRef))",message="authzConfig and authzConfigRef are mutually exclusive; use authzConfigRef to reference a shared MCPAuthzConfig"
41
42
// +kubebuilder:validation:XValidation:rule="!(has(self.telemetry) && has(self.telemetryConfigRef))",message="telemetry and telemetryConfigRef are mutually exclusive; migrate to telemetryConfigRef"
42
43
//
43
44
//nolint:lll // CEL validation rules exceed line length limit
// MCPServerSpec defines the desired state of MCPServer
177
177
//
178
178
// +kubebuilder:validation:XValidation:rule="!(has(self.oidcConfig) && has(self.oidcConfigRef))",message="oidcConfig and oidcConfigRef are mutually exclusive; use oidcConfigRef to reference a shared MCPOIDCConfig"
179
+
// +kubebuilder:validation:XValidation:rule="!(has(self.authzConfig) && has(self.authzConfigRef))",message="authzConfig and authzConfigRef are mutually exclusive; use authzConfigRef to reference a shared MCPAuthzConfig"
179
180
// +kubebuilder:validation:XValidation:rule="!(has(self.telemetry) && has(self.telemetryConfigRef))",message="telemetry and telemetryConfigRef are mutually exclusive; migrate to telemetryConfigRef"
Copy file name to clipboardExpand all lines: cmd/thv-operator/api/v1alpha1/virtualmcpserver_types.go
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -111,6 +111,7 @@ type EmbeddingServerRef struct {
111
111
//
112
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
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"
114
+
// +kubebuilder:validation:XValidation:rule="!(has(self.authzConfig) && has(self.authzConfigRef))",message="authzConfig and authzConfigRef are mutually exclusive; use authzConfigRef to reference a shared MCPAuthzConfig"
114
115
//
115
116
//nolint:lll // CEL validation rules exceed line length limit
0 commit comments