Add EmbeddingServerRef to VirtualMCPServer for optimizer integration#3839
Merged
aponcedeleonch merged 7 commits intomainfrom Feb 19, 2026
Merged
Add EmbeddingServerRef to VirtualMCPServer for optimizer integration#3839aponcedeleonch merged 7 commits intomainfrom
aponcedeleonch merged 7 commits intomainfrom
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3839 +/- ##
==========================================
- Coverage 66.90% 66.81% -0.10%
==========================================
Files 444 445 +1
Lines 44305 44507 +202
==========================================
+ Hits 29644 29736 +92
- Misses 12352 12444 +92
- Partials 2309 2327 +18 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ChrisJBurns
reviewed
Feb 16, 2026
0fc5319 to
afad2d0
Compare
afad2d0 to
2aa161e
Compare
2aa161e to
efc3374
Compare
efc3374 to
1094c78
Compare
yrobla
previously approved these changes
Feb 17, 2026
2122127 to
125189a
Compare
b025c08 to
5eca1ee
Compare
jerm-dro
requested changes
Feb 17, 2026
jerm-dro
requested changes
Feb 17, 2026
Contributor
jerm-dro
left a comment
There was a problem hiding this comment.
some minor changes requested, but this mostly LGTM
Add hybrid EmbeddingServer pattern to VirtualMCPServer, enabling both inline (1:1 auto-deployed) and reference (shared) modes. This allows multiple VirtualMCPServers to share a single EmbeddingServer resource via embeddingServerRef, reducing GPU/memory waste when using the same embedding model. Key changes: - Add EmbeddingServerRef type and spec field (mutually exclusive with inline embeddingServer) - Add webhook validation enforcing mutual exclusivity and optimizer/embedding co-dependency rules - Add controller-level validation for referenced EmbeddingServer existence and readiness - Add EmbeddingServer watch for reference-based reconciliation - Add EmbeddingServerReady condition type and status reporting - Extract runValidations helper to reduce Reconcile complexity - Update config wiring to resolve embedding service name for both modes Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
d0940d8 to
9d04dfd
Compare
jerm-dro
approved these changes
Feb 19, 2026
Contributor
jerm-dro
left a comment
There was a problem hiding this comment.
LGTM!
Suggestion: add some integration tests to validate the integration of all this code. Examples are here: https://github.com/stacklok/toolhive/blob/issue-3733/pr2-real-tei-client/cmd/thv-operator/test-integration/embedding-server/embeddingserver_update_test.go
You can do that in a separate PR, if at all.
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.
Related to: #3733
Add
embeddingServerReffield to VirtualMCPServer, allowing it to reference an existing EmbeddingServer resource for optimizer integration. The operator validates the reference, waits for EmbeddingServer readiness, and auto-populates the optimizer config with the resolved embedding service URL.Key changes:
EmbeddingServerReftype and spec field on VirtualMCPServerSpecembeddingServerRefor manualembeddingServiceembeddingServerRefis set without explicit optimizer configEmbeddingServerReadycondition type and status reportingStatus.URLinto optimizer configrunValidationshelper to reduce Reconcile complexitymodelandimagefields optional with sensible defaults (BAAI/bge-small-en-v1.5,cpu-latest)embeddingServiceoptional (auto-populated by operator)embeddingServerRefflowLarge PR Justification