-
Story
-
Resolution: Unresolved
-
Undefined
-
None
-
None
-
None
-
Product / Portfolio Work
-
False
-
-
False
-
3
-
None
-
None
Description
Implement the read-only router inspection tools using native Go libraries. These tools provide safe, non-mutating inspection of OpenShift Router pods, allowing users to view configuration, runtime statistics, and active sessions.
Goals
- Implement inspection tools for OpenShift Router pods (HAProxy).
- Ensure strict read-only execution.
Tool Definitions
1. router_show_config
- Description: View the router's configuration.
- Input Schema:
{ "type": "object", "properties": { "pod": { "type": "string", "description": "Router pod name (optional)" } } } - Output Schema:
{ "type": "string", "description": "Router configuration (haproxy.cfg) wrapped in markdown code block" }2. router_show_info
- Description: Get router runtime information and statistics.
- Input Schema:
{ "type": "object", "properties": { "pod": { "type": "string", "description": "Router pod name (optional)" } } } - Output Schema:
{ "type": "string", "description": "HAProxy runtime info and stats wrapped in markdown code block" }3. router_show_sessions
- Description: View all active sessions in the router.
- Input Schema:
{ "type": "object", "properties": { "pod": { "type": "string", "description": "Router pod name (optional)" } } } - Output Schema:
{ "type": "string", "description": "Active session list wrapped in markdown code block" }Implementation Steps
- Implement router_show_config:
- Logic: Identify the target router pod. Exec into the container and retrieve the configuration. Return as a markdown block.
- Implement router_show_info:
- Logic: Identify the target router pod. Exec into the container and query the HAProxy stats socket (e.g., `show info`, `show stat`).
- Implement router_show_sessions:
- Logic: Identify the target router pod. Exec into the container and query the HAProxy session table.
- Constraint Checklist:
- MCP tool router_show_config matches schema and returns configuration.
- MCP tool router_show_info matches schema and returns stats.
- MCP tool router_show_sessions matches schema and returns session list.
- All implementation is native Go (no shell-outs to `oc`).