You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(operator): add kagent v1alpha2 RemoteMCPServer support
This commit adds support for kagent v1alpha2 API which uses RemoteMCPServer
resources instead of the v1alpha1 ToolServer resources.
- Added detectKagentAPIVersion() to automatically detect available kagent API version
- Added getPreferredKagentAPIVersion() to check for user preference via env var
- Added createKagentRemoteMCPServerObject() for v1alpha2 RemoteMCPServer creation
- Updated ensureKagentToolServer() to support both v1alpha1 and v1alpha2
- Updated deleteKagentToolServer() to handle both resource types
- Added optional kagentIntegration.apiVersion to prefer v1alpha2 when available
- Added KAGENT_API_VERSION environment variable to operator deployment
- Added RBAC permissions for kagent.dev/remotemcpservers resources
- Automatic API version detection - uses the highest available version
- Backward compatible - defaults to v1alpha1 if v1alpha2 not available
- User can explicitly prefer v1alpha2 via Helm values
- Seamless migration path from v1alpha1 to v1alpha2
- Added tests for API version detection logic
- Added tests for RemoteMCPServer object creation
- Updated existing tests to handle both API versions
- Fixed test parallelization issues with environment variables
Kagent v1alpha2 introduces the RemoteMCPServer resource which replaces
the v1alpha1 ToolServer resource. This change ensures ToolHive can work
with both versions of kagent, providing a smooth migration path for users.
The implementation maintains backward compatibility while being ready for
the newer kagent API version.
The ToolHive operator supports optional integration with [kagent](https://kagent.dev), allowing kagent agents to discover and use MCP servers managed by ToolHive. When enabled, the operator automatically creates kagent ToolServer resources that reference the ToolHive-managed MCP servers.
218
+
The ToolHive operator supports optional integration with [kagent](https://kagent.dev), allowing kagent agents to discover and use MCP servers managed by ToolHive. When enabled, the operator automatically creates kagent resources that reference the ToolHive-managed MCP servers.
0 commit comments