Inject Redis session storage config into vMCP ConfigMap#4387
Inject Redis session storage config into vMCP ConfigMap#4387
Conversation
There was a problem hiding this comment.
Pull request overview
Adds Redis session storage connection settings to the vMCP config injected via the operator so horizontally scaled vMCP pods can discover Redis parameters at startup (with the password still injected via env var).
Changes:
- Extend
pkg/vmcp/config.Configwith an optionalSessionStorageblock (address/db/keyPrefix; no password). - Populate the new config field from
VirtualMCPServerSpec.SessionStoragein the operator’s vMCP config converter when provider isredis. - Regenerate deepcopy output and update generated CRD API docs to include the new config surface.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/vmcp/config/config.go | Adds SessionStorage to vMCP runtime config model and defines SessionStorageConfig schema. |
| pkg/vmcp/config/zz_generated.deepcopy.go | Updates generated deep-copy logic for the new config field/type. |
| cmd/thv-operator/pkg/vmcpconfig/converter.go | Injects Redis session storage connection parameters into the generated vMCP config. |
| cmd/thv-operator/api/v1alpha1/mcpserver_types.go | Updates API type comments to reflect new injection behavior. |
| docs/operator/crd-api.md | Updates generated CRD/API documentation to include the new sessionStorage config block. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4387 +/- ##
==========================================
- Coverage 69.48% 69.46% -0.03%
==========================================
Files 485 485
Lines 49576 49814 +238
==========================================
+ Hits 34450 34604 +154
- Misses 12461 12530 +69
- Partials 2665 2680 +15 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fd3a747a7f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Add SessionStorageConfig to pkg/vmcp/config.Config and populate it in the VirtualMCPServer converter when spec.sessionStorage.provider is "redis". This allows vMCP pods to discover Redis connection parameters (address, db, keyPrefix) at startup via the existing config injection path. The Redis password is excluded from the config type and is injected separately as the THV_SESSION_REDIS_PASSWORD environment variable by the deployment builder. Closes: #4214
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
Add SessionStorageConfig to pkg/vmcp/config.Config and populate it in the VirtualMCPServer converter when spec.sessionStorage.provider is "redis". This allows vMCP pods to discover Redis connection parameters (address, db, keyPrefix) at startup via the existing config injection path. The Redis password is excluded from the config type and is injected separately as the THV_SESSION_REDIS_PASSWORD environment variable by the deployment builder.
Fixes #4214
Type of change
Test plan
task test)task test-e2e)task lint-fix)Changes
Does this introduce a user-facing change?
Special notes for reviewers