feat(cluster): honor --request-timeout flag in K8s client config#121
Merged
Conversation
basebandit
added a commit
that referenced
this pull request
May 12, 2026
* chore(deps): bump mcp-go 0.28.0->0.52.0, k8s 0.33.1->0.34.1, golangci-lint 2.1.6->2.12.2 * chore: migrate to mcp-go v0.52.0 API * feat(tools): add MCP tool annotations to all 66 tools * feat(transport): add Streamable HTTP transport at /mcp * feat(cluster): honor --request-timeout flag in K8s client config (#121) * feat(cluster): honor --request-timeout flag in K8s client config * fix(lint): replace WriteString(Sprintf) with Fprintf (staticcheck QF1012)
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.
Summary
cluster.Optionfunctional-option pattern withWithRequestTimeout(d)oncluster.Manager.createClientsnow reads the timeout from the Manager instead of hardcoding 30s, so the user-facing--request-timeoutflag is honored end-to-end.cmd/kai/main.gopassescluster.WithRequestTimeout(requestTimeout)tocluster.New(...)alongside the existingkai.WithRequestTimeout.Why
Server.GetRequestTimeout()existed with no callers — the flag value was stored but never reached the K8s REST client. Phase A.4 of the modernization plan closes that gap.Test plan
go build ./...go vet ./...go test -race ./...kai --request-timeout=2s ...against a slow endpoint should abort at ~2s.Stacked on
feat/streamable-http(#117).