openshift / openshift/lightspeed-operator
feat: Auto-detect OpenShift Virtualization and enable kubevirt MCP toolset
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 16
- Forks
- 56
- Avg merge
- 2d 57m
- Merged PRs (30d)
- 72
Description
Problem
The embedded MCP server in OLS currently uses a hardcoded toolset list: ["core", "config", "helm", "metrics"]. The kubevirt toolset is not enabled even when OpenShift Virtualization is installed on the cluster.
This means users with OpenShift Virtualization get no VM-specific troubleshooting tools in OLS unless an admin manually patches the openshift-mcp-server-config ConfigMap — which the operator immediately reverts on reconciliation.
Proposal
The OLS operator should auto-detect whether OpenShift Virtualization is installed (e.g., by checking for the HyperConverged CRD or the kubevirt-hyperconverged CR in openshift-cnv namespace) and automatically add "kubevirt" to the MCP server toolsets during ConfigMap reconciliation.
Detection logic (example)
// During reconcileAppServerResources:
if crdExists("hyperconvergeds.hco.kubevirt.io") {
toolsets = append(toolsets, "kubevirt")
}
Why this matters
We tested OLS with the kubevirt toolset enabled against three VM troubleshooting scenarios (storage failure, crashloop, migration failure). With gpt-5.2 in troubleshooting mode, OLS correctly identified root causes in all three cases using the kubevirt MCP tools. Without the toolset enabled, OLS can only use alert data and generic Kubernetes tools, producing significantly weaker diagnostics.
Testing results
| Model | kubevirt toolset | Root causes identified |
|---|---|---|
| gpt-4o-mini | disabled | 0/3 (only alert summaries) |
| gpt-4o-mini | enabled + explicit prompt | 2/3 |
| gpt-5.2 | enabled | 3/3 (all scenarios, simple questions) |
Related PRs
- openshift/openshift-mcp-server#365 — adds
vm_troubleshootas an MCP Tool - rhobs/troubleshooting-scenarios#12 — KubeVirt evaluation scenarios
Acceptance criteria
- When OpenShift Virtualization is installed, the kubevirt toolset is automatically enabled in the MCP server config
- When OpenShift Virtualization is NOT installed, the kubevirt toolset is not included (no error, no degradation)
- No manual configuration required by the cluster admin
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.
Research direction
Start at reconcileAppServerResources, where the embedded MCP server toolsets are assembled and the ConfigMap is reconciled. Check how the operator can detect the HyperConverged CRD or kubevirt-hyperconverged resource without degrading when it is absent. Done means kubevirt is included only when OpenShift Virtualization is installed and remains absent otherwise, with no manual configuration required.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- infrastructure
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100