feat(k8s): add k8s_wait_for_condition tool#58
Open
mesutoezdil wants to merge 1 commit intokagent-dev:mainfrom
Open
feat(k8s): add k8s_wait_for_condition tool#58mesutoezdil wants to merge 1 commit intokagent-dev:mainfrom
mesutoezdil wants to merge 1 commit intokagent-dev:mainfrom
Conversation
b8a975c to
33efb25
Compare
Wraps kubectl wait so agents can block on a resource condition in one call instead of polling with repeated kubectl get turns. Closes kagent-dev#56 Co-authored-by: alexis-brettes <133014848+alexis-brettes@users.noreply.github.com> Signed-off-by: mesutoezdil <mesudozdil@gmail.com>
33efb25 to
d157f4f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a new MCP tool
k8s_wait_for_conditionthat wrapskubectl waitand blocks until a Kubernetes resource reaches a specified condition or the timeout expires.Agents that deploy resources currently have to poll with repeated
kubectl getcalls in a loop. Each iteration is a full LLM turn, wasting tokens and adding latency.With this tool, a single blocking call replaces the loop:
Before:
After:
resource_typeresource_nameconditionnamespacetimeout_secondsSeven unit tests cover: success path, custom namespace and timeout, missing required parameters, zero timeout rejection, and kubectl timeout propagation.
Closes #56