Skip to content

Inject Redis session storage config into vMCP ConfigMap#4387

Open
yrobla wants to merge 1 commit intomainfrom
issue-4214
Open

Inject Redis session storage config into vMCP ConfigMap#4387
yrobla wants to merge 1 commit intomainfrom
issue-4214

Conversation

@yrobla
Copy link
Contributor

@yrobla yrobla commented Mar 26, 2026

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

  • Bug fix
  • New feature
  • Refactoring (no behavior change)
  • Dependency update
  • Documentation
  • Other (describe):

Test plan

  • Unit tests (task test)
  • E2E tests (task test-e2e)
  • Linting (task lint-fix)
  • Manual testing (describe below)

Changes

File Change

Does this introduce a user-facing change?

Special notes for reviewers

@github-actions github-actions bot added the size/S Small PR: 100-299 lines changed label Mar 26, 2026
@yrobla yrobla requested a review from Copilot March 26, 2026 12:57
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.Config with an optional SessionStorage block (address/db/keyPrefix; no password).
  • Populate the new config field from VirtualMCPServerSpec.SessionStorage in the operator’s vMCP config converter when provider is redis.
  • 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
Copy link

codecov bot commented Mar 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.46%. Comparing base (f7ab64a) to head (75bb444).
⚠️ Report is 1 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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
@github-actions github-actions bot added size/S Small PR: 100-299 lines changed and removed size/S Small PR: 100-299 lines changed labels Mar 26, 2026
@yrobla yrobla requested a review from Copilot March 26, 2026 13:07
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor

@jerm-dro jerm-dro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

edit: removing claude comment I disagreed with

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/S Small PR: 100-299 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inject Redis session storage config into VirtualMCPServer vMCP ConfigMap

4 participants