fix(helm): disable RemoteMCPServer when kagent-tools is disabled#1308
Merged
EItanya merged 1 commit intokagent-dev:mainfrom Feb 16, 2026
Merged
Conversation
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>
Contributor
There was a problem hiding this comment.
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.enabledflag
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
EItanya
approved these changes
Feb 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
When
kagent-tools.enabledis set tofalsein the Helm chart values, theRemoteMCPServerresource intoolserver-kagent.yamlwas still being created. This wraps the entire template in a{{- if index .Values "kagent-tools" "enabled" }}conditional so the resource is only rendered whenkagent-toolsis enabled.Changes
helm/kagent/templates/toolserver-kagent.yaml: Added conditional guard around the entire templateTesting
Verified with
helm template:--set kagent-tools.enabled=false→ RemoteMCPServer is not rendered--set kagent-tools.enabled=true→ RemoteMCPServer is renderedFixes #1243