Commit fc0c161
MCP Kubernetes Discovery Enhancements (#350)
* Add OpenSSF Scorecard badge to README
* Add `GetPodLogs` method to KubernetesDiscoveryAdapter
- Implements a function to fetch pod logs with configurable options, including tail line limits, timestamps, and stream size constraints.
- Adds helper `splitLogLines` function to process log content into lines.
* Add `GetPodLogs` method to KubernetesDiscoveryHTTP
- Implements a function to fetch pod logs with configurable options, such as container, timestamps, tail lines, and more.
* Add `GetPodLogs` method and supporting types to `fwdapi` interface
- Introduces `GetPodLogs`, enabling retrieval of pod logs with configurable options.
- Adds `PodLogsOptions` and `PodLogsResponse` types for log retrieval parameters and responses.
* Introduce `get_pod_logs` tool to fetch Kubernetes pod logs
- Adds `GetPodLogsInput` type for customizable log retrieval parameters.
- Registers `get_pod_logs` as an MCP tool for debugging Kubernetes services.
- Implements `handleGetPodLogs` to fetch logs via Kubernetes discovery.
* Add mock implementations and tests for `GetPodLogs`
- Introduce `GetPodLogs` mock methods in test files for Kubernetes discovery.
- Add unit tests for `handleGetPodLogs` to verify functionality with various scenarios.
* Add pod and resource discovery methods to `KubernetesDiscoveryAdapter`
- Introduces `ListPods`, `GetPod`, and `GetEndpoints` for Kubernetes resource discovery.
- Implements `GetEvents` to fetch Kubernetes events with customizable options.
- Adds helper functions for pod conversion and formatting.
* Add pod and event management tools to `KubernetesDiscoveryHTTP`
- Implements `ListPods`, `GetPod`, `GetEvents`, and `GetEndpoints` methods for pod, event, and endpoint discovery.
- Registers `list_pods`, `get_pod`, `get_events`, and `get_endpoints` MCP tools to provide detailed resource and event diagnostics for Kubernetes namespaces.
- Adds supporting types like `ListPodsOptions`, `GetEventsOptions`, `K8sPod`, and `K8sEndpoints` for better resource representation and filtering.
* Add mock implementations for pod and resource discovery methods
- Adds `ListPods`, `GetPod`, `GetEvents`, and `GetEndpoints` mocks to support KubernetesDiscovery testing.
- Updates test files to include mock resource discovery for enhanced coverage.
* Handle errors when closing log stream and refactor log line processing logic
* Add FOSSA configuration file for dependency analysis and license compliance
* Add tests for new MCP tools and adapter functions
- Add tests for handleListPods, handleGetPod, handleGetEvents, handleGetEndpoints
- Add tests for handleListContexts, handleGetAnalysis, handleGetQuickStatus, handleGetHistory
- Add tests for splitLogLines and formatDuration helper functions
- Add tests for KubernetesDiscoveryAdapter pod/event/endpoint methods with nil manager
This improves patch coverage from 59.8% to 65.2% for fwdmcp package.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Fix FOSSA configuration format to use targets section
Update .fossa.yml to use the correct v3 format:
- Use 'targets: only:' instead of 'analyze: types:'
- Specify 'type: go' to analyze only Go modules
- This should exclude Python/pip documentation dependencies
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>1 parent 5622aeb commit fc0c161
File tree
11 files changed
+1977
-1
lines changed- pkg
- fwdapi
- handlers
- types
- fwdmcp
11 files changed
+1977
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | 10 | | |
| 11 | + | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
0 commit comments