-
Notifications
You must be signed in to change notification settings - Fork 356
feat: add configurable resource settings for MCP tools and agents #902
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds comprehensive resource configuration support for all MCP tools and agents deployed by Kagent, addressing production environment requirements and security compliance needs.
- Enhances Agent CRD with optional
Resourcesfield inSharedDeploymentSpec - Adds resource configurations to all MCP tools (grafana-mcp, querydoc, kagent-tools) and 10 agents
- Updates translator logic to use configurable resources with fallback defaults
Reviewed Changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| go/api/v1alpha2/agent_types.go | Adds Resources field to SharedDeploymentSpec |
| go/internal/controller/translator/adk_api_translator.go | Updates resource assignment logic with configurable support |
| helm/kagent/values.yaml | Adds resource configs for kagent-tools and all 10 agents |
| helm/tools/grafana-mcp/values.yaml | Adds resource configuration for grafana-mcp tool |
| helm/agents/*/values.yaml | Adds resource configurations to individual agent charts |
| helm/agents/*/templates/agent.yaml | Updates agent templates to include resource specs |
| go/config/crd/bases/*.yaml | Updates CRD definitions with Resources field |
| helm/kagent-crds/templates/*.yaml | Updates Helm-templated CRDs |
Comments suppressed due to low confidence (1)
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| memory: 512Mi | ||
|
|
||
| querydoc: | ||
| replicas: 1 |
Copilot
AI
Sep 16, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing resource configuration for the querydoc tool. Based on the PR description mentioning querydoc should have 100m/128Mi requests and 500m/512Mi limits, this configuration appears incomplete.
| names: | ||
| categories: | ||
| - kagent | ||
| kind: ModelConfig |
Copilot
AI
Sep 16, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The removal of the 'categories' field appears unrelated to the resource configuration feature. This change should be documented or moved to a separate commit as it affects the CRD categorization without clear justification in this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have added back this part of code.
EItanya
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for the changes :). Just a few comments
| names: | ||
| categories: | ||
| - kagent | ||
| kind: ModelConfig |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed
| agentRef := types.NamespacedName{ | ||
| Namespace: agent.Namespace, | ||
| Name: tool.Agent.Name, | ||
| // Parse the agent reference (supports both "name" and "namespace/name") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah fixed this one too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me know if there is any thing more to modify. With this latest amended commit I feel all the issues has been fixed.
There was a problem hiding this 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 13 out of 13 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
Why have you added helm chart support to only some of the agent charts? If we are going to add it to the charts we should add it to all of them |
Thanks for the feedback! You're right - I should be consistent and add helm chart support to all agent charts, not just some of them. This was more of a proof-of-concept to validate the approach and get your input on whether I'm heading in the right direction. I'll definitely add the resource configurations to all remaining agent charts to ensure consistency across the entire project. |
- Add Resources field to Agent CRD SharedDeploymentSpec - Update translator to use configurable resources with fallback defaults - Add resource configurations to all MCP tools (grafana-mcp, querydoc, kagent-tools) - Add resource configurations to all agents (k8s, istio, helm, etc.) - Regenerate CRDs with new Resources field - Enable production-ready resource management and security compliance - Refactor inline function to helper function to avoid code duplication Fixes kagent-dev#897 Signed-off-by: Ronit <ronitk964@gmail.com>
|
Now, I have added helm chart support to all the agents and tool. Do let me if there is any thing more to update. If there are no further updates needed, we can proceed with merging this PR. All feedback has been addressed and the feature is ready for production use. |
Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>
…gent-dev#902) ## Summary This PR adds comprehensive resource configuration support for all MCP tools and agents deployed by Kagent, addressing production environment requirements and security compliance needs. ## Changes Made ### Core Infrastructure - **Agent CRD Enhancement**: Added `Resources` field to `SharedDeploymentSpec` in `agent_types.go` - **Translator Updates**: Modified `adk_api_translator.go` to use configurable resources with sensible defaults - **CRD Regeneration**: Updated generated CRDs to include the new Resources field ### MCP Tools Configuration - **grafana-mcp**: Added resource config (100m/128Mi requests, 500m/512Mi limits) - **querydoc**: Added resource config (100m/128Mi requests, 500m/512Mi limits) - **kagent-tools**: Added resource config (100m/256Mi requests, 1000m/1Gi limits) ### Agent Configuration Added resource configurations for all 10 agents: - **k8s-agent**: 100m/256Mi requests, 1000m/1Gi limits - **kgateway-agent**: 100m/256Mi requests, 1000m/1Gi limits - **istio-agent**: 100m/256Mi requests, 1000m/1Gi limits - **promql-agent**: 100m/256Mi requests, 1000m/1Gi limits - **observability-agent**: 100m/256Mi requests, 1000m/1Gi limits - **argo-rollouts-agent**: 100m/256Mi requests, 1000m/1Gi limits - **helm-agent**: 100m/256Mi requests, 1000m/1Gi limits - **cilium-policy-agent**: 100m/256Mi requests, 1000m/1Gi limits - **cilium-manager-agent**: 100m/256Mi requests, 1000m/1Gi limits - **cilium-debug-agent**: 100m/256Mi requests, 1000m/1Gi limits ## Benefits - ✅ Production-ready resource management - ✅ Security compliance for resource scanning tools - ✅ Configurable via Helm values for different environments - ✅ Backward compatible with sensible defaults - ✅ Consistent resource allocation across all components ## Testing - Verified Helm template rendering with new resource configurations Fixes kagent-dev#897 --------- Signed-off-by: Ronit <ronitk964@gmail.com> Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io> Co-authored-by: Eitan Yarmush <eitan.yarmush@solo.io> Signed-off-by: krisztianfekete <git@krisztianfekete.org>
…gent-dev#902) ## Summary This PR adds comprehensive resource configuration support for all MCP tools and agents deployed by Kagent, addressing production environment requirements and security compliance needs. ## Changes Made ### Core Infrastructure - **Agent CRD Enhancement**: Added `Resources` field to `SharedDeploymentSpec` in `agent_types.go` - **Translator Updates**: Modified `adk_api_translator.go` to use configurable resources with sensible defaults - **CRD Regeneration**: Updated generated CRDs to include the new Resources field ### MCP Tools Configuration - **grafana-mcp**: Added resource config (100m/128Mi requests, 500m/512Mi limits) - **querydoc**: Added resource config (100m/128Mi requests, 500m/512Mi limits) - **kagent-tools**: Added resource config (100m/256Mi requests, 1000m/1Gi limits) ### Agent Configuration Added resource configurations for all 10 agents: - **k8s-agent**: 100m/256Mi requests, 1000m/1Gi limits - **kgateway-agent**: 100m/256Mi requests, 1000m/1Gi limits - **istio-agent**: 100m/256Mi requests, 1000m/1Gi limits - **promql-agent**: 100m/256Mi requests, 1000m/1Gi limits - **observability-agent**: 100m/256Mi requests, 1000m/1Gi limits - **argo-rollouts-agent**: 100m/256Mi requests, 1000m/1Gi limits - **helm-agent**: 100m/256Mi requests, 1000m/1Gi limits - **cilium-policy-agent**: 100m/256Mi requests, 1000m/1Gi limits - **cilium-manager-agent**: 100m/256Mi requests, 1000m/1Gi limits - **cilium-debug-agent**: 100m/256Mi requests, 1000m/1Gi limits ## Benefits - ✅ Production-ready resource management - ✅ Security compliance for resource scanning tools - ✅ Configurable via Helm values for different environments - ✅ Backward compatible with sensible defaults - ✅ Consistent resource allocation across all components ## Testing - Verified Helm template rendering with new resource configurations Fixes kagent-dev#897 --------- Signed-off-by: Ronit <ronitk964@gmail.com> Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io> Co-authored-by: Eitan Yarmush <eitan.yarmush@solo.io> Signed-off-by: krisztianfekete <git@krisztianfekete.org>
Summary
This PR adds comprehensive resource configuration support for all MCP tools and agents deployed by Kagent, addressing production environment requirements and security compliance needs.
Changes Made
Core Infrastructure
Resourcesfield toSharedDeploymentSpecinagent_types.goadk_api_translator.goto use configurable resources with sensible defaultsMCP Tools Configuration
Agent Configuration
Added resource configurations for all 10 agents:
Benefits
Testing
Fixes #897