Skip to content

fix(helm): disable RemoteMCPServer when kagent-tools is disabled#1308

Merged
EItanya merged 1 commit intokagent-dev:mainfrom
opspawn:fix/1243-remotemcpserver-conditional
Feb 16, 2026
Merged

fix(helm): disable RemoteMCPServer when kagent-tools is disabled#1308
EItanya merged 1 commit intokagent-dev:mainfrom
opspawn:fix/1243-remotemcpserver-conditional

Conversation

@opspawn
Copy link
Contributor

@opspawn opspawn commented Feb 15, 2026

Summary

When kagent-tools.enabled is set to false in the Helm chart values, the RemoteMCPServer resource in toolserver-kagent.yaml was still being created. This wraps the entire template in a {{- if index .Values "kagent-tools" "enabled" }} conditional so the resource is only rendered when kagent-tools is enabled.

Changes

  • helm/kagent/templates/toolserver-kagent.yaml: Added conditional guard around the entire template

Testing

Verified with helm template:

  • --set kagent-tools.enabled=false → RemoteMCPServer is not rendered
  • --set kagent-tools.enabled=true → RemoteMCPServer is rendered

Fixes #1243

Wrap the entire toolserver-kagent.yaml template in a conditional
so that the RemoteMCPServer resource is only created when
kagent-tools.enabled is set to true.

Fixes kagent-dev#1243

Signed-off-by: opspawn <opspawn@users.noreply.github.com>
Copilot AI review requested due to automatic review settings February 15, 2026 11:03
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

This PR fixes a bug where the RemoteMCPServer Kubernetes resource was being created even when the kagent-tools subchart was disabled via Helm values. When kagent-tools.enabled is set to false, the controller would continuously log errors trying to connect to a non-existent kagent-tools service. The fix wraps the entire template in a conditional block so the RemoteMCPServer is only rendered when kagent-tools is enabled.

Changes:

  • Added conditional guard around the RemoteMCPServer template to check kagent-tools.enabled flag

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@EItanya EItanya merged commit 8df49a4 into kagent-dev:main Feb 16, 2026
21 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] RemoteMCPServer should be disabled when kagent-tools is disabled

2 participants