-
Notifications
You must be signed in to change notification settings - Fork 95
Add exec_in_pod tool for command execution in Kubernetes pods #128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add exec_in_pod tool for command execution in Kubernetes pods #128
Conversation
…r command execution
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a new tool, exec_in_pod, which enables command execution in Kubernetes pods while supporting both string and array command formats along with optional shell and container parameters. The key changes include:
- Implementation of the exec_in_pod tool with input validation and output handling.
- New tests to verify both array and string command executions and error handling.
- Updates to response schemas and the main request handler to register the new tool.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
tests/exec_in_pod.test.ts | New integration tests for the exec_in_pod tool functionality. |
src/tools/exec_in_pod.ts | Implementation of the exec_in_pod tool using the Kubernetes Exec API. |
src/models/response-schemas.ts | Added ExecInPodResponseSchema to support the new tool. |
src/index.ts | Updated request handler to include exec_in_pod in the tool list. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just the comment about making timeout configurable. I think the copilot review around using ExecInPodSchema is correct too, so probably want to update that.
Everything else LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM - not entirely sure whats causing the tests to fail though, once tests are fixed up can merge & make new build.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want to land this before the big refactor or after?
This one needs a rebase after the refactor |
Introduce a new tool to execute commands within Kubernetes pods, enhancing the functionality with a schema for input validation and response handling. The implementation supports both string and array command formats, along with an optional shell specification.