Add headerForward to MCPRemoteProxy CRD #3458
Open
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
Add support for forwarding custom headers to remote MCP servers via MCPRemoteProxy. Headers can be specified as plaintext values or resolved from Kubernetes Secrets at runtime.
New CRD Fields
Commits
1. Allow TOOLHIVE_SECRETS_PROVIDER env var to bypass SetupCompleted check
Previously,
GetProviderType()checkedSetupCompletedbefore checking the environment variable, causing Kubernetes deployments to fail when using environment-injected secrets.Reorders the checks so the environment variable is checked first, allowing Kubernetes deployments to specify
TOOLHIVE_SECRETS_PROVIDER=environmentwithout requiring local secrets setup.2. Add headerForward to MCPRemoteProxy CRD
Implementation:
TOOLHIVE_SECRETS_PROVIDER=environmentto enable the EnvironmentProvider in the runnerSecurity:
kubectl describeshows<set to key 'x' in secret 'y'>resolvedHeadersfield is not serialized to diskExample Manifests
Secret-backed headers only
Mixed plaintext and secret headers
Test plan
Tested in kind cluster using yardstick MCP server (patched to log incoming headers):
Verified headers appear in yardstick logs: