Replace ReferencingServers with structured ReferencingWorkloads on MCPOIDCConfig#4492
Merged
Merged
Conversation
4 tasks
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #4492 +/- ##
==========================================
+ Coverage 69.31% 69.35% +0.03%
==========================================
Files 502 502
Lines 51632 51635 +3
==========================================
+ Hits 35791 35811 +20
+ Misses 13075 13058 -17
Partials 2766 2766 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
JAORMX
previously approved these changes
Apr 2, 2026
…POIDCConfig RFC-0023 specifies a structured referencingWorkloads list with kind and name fields rather than plain strings. This replaces the ReferencingServers []string field on MCPOIDCConfig with ReferencingWorkloads []WorkloadReference, a new type with Kind and Name fields that explicitly identifies each referencing workload. The WorkloadReference type supports MCPServer, VirtualMCPServer, and MCPRemoteProxy kinds, making the data model self-describing and type-safe. The MCPServer controller and MCPOIDCConfig controller are updated to use the new structured type throughout: reference tracking, deletion protection, watch handlers, and status updates. The same migration is needed for MCPToolConfig, MCPTelemetryConfig, and MCPExternalAuthConfig — tracked in #4491. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3079635 to
1f94b73
Compare
blkt
approved these changes
Apr 2, 2026
ChrisJBurns
added a commit
that referenced
this pull request
Apr 2, 2026
…PToolConfig Migrate MCPToolConfig from plain string server names to structured WorkloadReference entries (kind + name) per RFC-0023, following the pattern already implemented on MCPOIDCConfig in PR #4492. - Replace ReferencingServers []string with ReferencingWorkloads []WorkloadReference - Add findReferencingWorkloads returning []WorkloadReference - Update handleDeletion to use DeletionBlocked condition with ReferencedByWorkloads reason - Update watch handler to check ref.Kind and ref.Name for stale entry cleanup - Update unit, edge-case, and integration tests for WorkloadReference assertions - Regenerate deepcopy, CRD manifests, and Helm templates Closes #4491 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ChrisJBurns
added a commit
that referenced
this pull request
Apr 2, 2026
…PExternalAuthConfig RFC-0023 specifies a structured referencingWorkloads list with kind and name fields on shared configuration CRD status. This migrates MCPExternalAuthConfig from plain []string to []WorkloadReference, following the pattern already implemented for MCPOIDCConfig in #4492. The deletion handler now uses a DeletionBlocked condition with reason ReferencedByWorkloads and requeues instead of returning an error. The watch handler also enqueues configs with stale ReferencingWorkloads entries to handle ref-removal and server-deletion cases. Closes #4491 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This was referenced Apr 2, 2026
ChrisJBurns
added a commit
that referenced
this pull request
Apr 2, 2026
…PToolConfig Migrate MCPToolConfig from plain string server names to structured WorkloadReference entries (kind + name) per RFC-0023, following the pattern already implemented on MCPOIDCConfig in PR #4492. - Replace ReferencingServers []string with ReferencingWorkloads []WorkloadReference - Add findReferencingWorkloads returning []WorkloadReference - Update handleDeletion to use DeletionBlocked condition with ReferencedByWorkloads reason - Update watch handler to check ref.Kind and ref.Name for stale entry cleanup - Update unit, edge-case, and integration tests for WorkloadReference assertions - Regenerate deepcopy, CRD manifests, and Helm templates Closes #4491 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ChrisJBurns
added a commit
that referenced
this pull request
Apr 2, 2026
…PExternalAuthConfig RFC-0023 specifies a structured referencingWorkloads list with kind and name fields on shared configuration CRD status. This migrates MCPExternalAuthConfig from plain []string to []WorkloadReference, following the pattern already implemented for MCPOIDCConfig in #4492. The deletion handler now uses a DeletionBlocked condition with reason ReferencedByWorkloads and requeues instead of returning an error. The watch handler also enqueues configs with stale ReferencingWorkloads entries to handle ref-removal and server-deletion cases. Closes #4491 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
4 tasks
ChrisJBurns
added a commit
that referenced
this pull request
Apr 2, 2026
…PToolConfig Migrate MCPToolConfig from plain string server names to structured WorkloadReference entries (kind + name) per RFC-0023, following the pattern already implemented on MCPOIDCConfig in PR #4492. - Replace ReferencingServers []string with ReferencingWorkloads []WorkloadReference - Add findReferencingWorkloads returning []WorkloadReference - Update handleDeletion to use DeletionBlocked condition with ReferencedByWorkloads reason - Update watch handler to check ref.Kind and ref.Name for stale entry cleanup - Update unit, edge-case, and integration tests for WorkloadReference assertions - Regenerate deepcopy, CRD manifests, and Helm templates Closes #4491 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ChrisJBurns
added a commit
that referenced
this pull request
Apr 2, 2026
…PExternalAuthConfig RFC-0023 specifies a structured referencingWorkloads list with kind and name fields on shared configuration CRD status. This migrates MCPExternalAuthConfig from plain []string to []WorkloadReference, following the pattern already implemented for MCPOIDCConfig in #4492. The deletion handler now uses a DeletionBlocked condition with reason ReferencedByWorkloads and requeues instead of returning an error. The watch handler also enqueues configs with stale ReferencingWorkloads entries to handle ref-removal and server-deletion cases. Closes #4491 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ChrisJBurns
added a commit
that referenced
this pull request
Apr 3, 2026
…#4506) Replace ReferencingServers with structured ReferencingWorkloads on MCPToolConfig Migrate MCPToolConfig from plain string server names to structured WorkloadReference entries (kind + name) per RFC-0023, following the pattern already implemented on MCPOIDCConfig in PR #4492. - Replace ReferencingServers []string with ReferencingWorkloads []WorkloadReference - Add findReferencingWorkloads returning []WorkloadReference - Update handleDeletion to use DeletionBlocked condition with ReferencedByWorkloads reason - Update watch handler to check ref.Kind and ref.Name for stale entry cleanup - Update unit, edge-case, and integration tests for WorkloadReference assertions - Regenerate deepcopy, CRD manifests, and Helm templates Closes #4491 Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ChrisJBurns
added a commit
that referenced
this pull request
Apr 3, 2026
…thConfig (#4507) Replace ReferencingServers with structured ReferencingWorkloads on MCPExternalAuthConfig RFC-0023 specifies a structured referencingWorkloads list with kind and name fields on shared configuration CRD status. This migrates MCPExternalAuthConfig from plain []string to []WorkloadReference, following the pattern already implemented for MCPOIDCConfig in #4492. The deletion handler now uses a DeletionBlocked condition with reason ReferencedByWorkloads and requeues instead of returning an error. The watch handler also enqueues configs with stale ReferencingWorkloads entries to handle ref-removal and server-deletion cases. Closes #4491 Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ChrisJBurns
added a commit
that referenced
this pull request
Apr 3, 2026
The printer columns for Ready and References on MCPOIDCConfig still pointed at the old condition type (Valid) and status field (referencingServers) after they were renamed in PRs #4490 and #4492. This caused both columns to show empty in kubectl output. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3 tasks
MatteoManzoni
pushed a commit
to DocPlanner/toolhive
that referenced
this pull request
Apr 4, 2026
…stacklok#4506) Replace ReferencingServers with structured ReferencingWorkloads on MCPToolConfig Migrate MCPToolConfig from plain string server names to structured WorkloadReference entries (kind + name) per RFC-0023, following the pattern already implemented on MCPOIDCConfig in PR stacklok#4492. - Replace ReferencingServers []string with ReferencingWorkloads []WorkloadReference - Add findReferencingWorkloads returning []WorkloadReference - Update handleDeletion to use DeletionBlocked condition with ReferencedByWorkloads reason - Update watch handler to check ref.Kind and ref.Name for stale entry cleanup - Update unit, edge-case, and integration tests for WorkloadReference assertions - Regenerate deepcopy, CRD manifests, and Helm templates Closes stacklok#4491 Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
MatteoManzoni
pushed a commit
to DocPlanner/toolhive
that referenced
this pull request
Apr 4, 2026
…thConfig (stacklok#4507) Replace ReferencingServers with structured ReferencingWorkloads on MCPExternalAuthConfig RFC-0023 specifies a structured referencingWorkloads list with kind and name fields on shared configuration CRD status. This migrates MCPExternalAuthConfig from plain []string to []WorkloadReference, following the pattern already implemented for MCPOIDCConfig in stacklok#4492. The deletion handler now uses a DeletionBlocked condition with reason ReferencedByWorkloads and requeues instead of returning an error. The watch handler also enqueues configs with stale ReferencingWorkloads entries to handle ref-removal and server-deletion cases. Closes stacklok#4491 Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
referencingWorkloadslist withkindandnamefields on shared configuration CRD status, rather than plain[]stringwith string prefix conventions. This introduces aWorkloadReferencetype and migrates MCPOIDCConfig fromReferencingServers []stringtoReferencingWorkloads []WorkloadReference.WorkloadReferenceentries throughout: reference tracking, deletion protection, watch handlers, and status updates.WorkloadReferencetype is reusable by MCPToolConfig, MCPTelemetryConfig, and MCPExternalAuthConfig in follow-up work (Migrate ReferencingServers to ReferencingWorkloads on remaining CRDs #4491).Type of change
Test plan
task test)task lint-fix)Changes
api/v1alpha1/mcpoidcconfig_types.goWorkloadReferencestruct; renameReferencingServers []string→ReferencingWorkloads []WorkloadReferencecontrollers/mcpoidcconfig_controller.gofindReferencingServers→findReferencingWorkloads; update watch handler, deletion handling, status updatescontrollers/mcpserver_controller.goupdateOIDCConfigReferencingServers→updateOIDCConfigReferencingWorkloads; useWorkloadReference{Kind: "MCPServer"}controllers/mcpserver_oidcconfig_test.goWorkloadReferencetest-integration/mcp-oidc-config/mcpoidcconfig_mcpserver_integration_test.goWorkloadReferencetest-integration/mcp-oidc-config/mcpoidcconfig_controller_integration_test.goconditionTypeValidconstantDoes this introduce a user-facing change?
Yes — the MCPOIDCConfig status field
referencingServers(plain string array) is replaced withreferencingWorkloads(structured array withkindandnamefields). This is a status-only change; the spec API is unchanged.Special notes for reviewers
WorkloadReferencetype is defined with an enum validation forKind(MCPServer,VirtualMCPServer,MCPRemoteProxy) to support all current workload types.Generated with Claude Code