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
Extract shared WorkloadReference helpers into controllerutil (#4520)
* Extract shared WorkloadReference helpers into controllerutil
The ReferencingWorkloads pattern was duplicated across four config
controllers with inconsistent sorting behavior: MCPTelemetryConfig and
MCPExternalAuthConfig sorted refs, but MCPToolConfig and MCPOIDCConfig
did not. This caused unnecessary API server writes when the same set of
workloads was discovered in a different list order across reconcile runs.
Extract SortWorkloadRefs, WorkloadRefsEqual, and
FindWorkloadRefsFromMCPServers into the shared controllerutil package
so all controllers use deterministic, consistent ordering. Each
controller's findReferencingWorkloads now delegates to the shared
helper, removing ~50 lines of duplicated list-filter-build logic.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Add WorkloadKind constants to replace string literals
Define WorkloadKindMCPServer, WorkloadKindVirtualMCPServer, and
WorkloadKindMCPRemoteProxy constants in the API types and use them
across all controllers. This fixes a goconst lint violation where
"MCPServer" appeared as a raw string literal 4+ times.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
0 commit comments