Add default resource limits to MCPRemoteProxy
Open
@Baltsat is already working on this.
Since Jul 30, 2026.
enhancement
kubernetes
operator
- Dominant language
- Go
- Stars
- 2.2k
- Forks
- 300
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 184
Description
Problem
MCPRemoteProxy currently does not have default resource limits, which creates the same security and operational risks that were addressed for MCPServer and VirtualMCPServer in #2873.
Current Behavior
cmd/thv-operator/controllers/mcpremoteproxy_deployment.go:31
resources := ctrlutil.BuildResourceRequirements(proxy.Spec.Resources)
This only uses user-provided resources with no defaults. If spec.resources is not specified, the container gets unlimited resources.
Expected Behavior
MCPRemoteProxy should:
- Use proxy runner defaults (50m/200m CPU, 64Mi/256Mi memory) when
spec.resourcesis not specified - Merge user-provided values with defaults (user values take precedence)
- Update
deploymentNeedsUpdateto check resources properly
Implementation
Apply the same pattern used for VirtualMCPServer in #2873:
func resourceRequirementsForRemoteProxy(proxy *mcpv1alpha1.MCPRemoteProxy) corev1.ResourceRequirements {
defaultResources := ctrlutil.BuildDefaultProxyRunnerResourceRequirements()
userResources := ctrlutil.BuildResourceRequirements(proxy.Spec.Resources)
return ctrlutil.MergeResourceRequirements(defaultResources, userResources)
}
Then use it in:
deploymentForMCPRemoteProxy(line 31)deploymentNeedsUpdate(line 691 in mcpremoteproxy_controller.go)
Files to Update
cmd/thv-operator/controllers/mcpremoteproxy_deployment.gocmd/thv-operator/controllers/mcpremoteproxy_controller.go- Add tests similar to
virtualmcpserver_deployment_test.go
Related
- Issue #2873 - Add default resource limits to VirtualMCPServer vmcp container
- PR addressing MCPServer and VirtualMCPServer defaults
Security/Operational Impact
Without defaults:
- Remote proxy containers can monopolize cluster resources
- No protection against runaway processes
- Inconsistent behavior across MCPServer, VirtualMCPServer, and MCPRemoteProxy
Labels
enhancementoperatorsecuritygood first issue(pattern is well-established)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.