Skip to content

feat(cluster): honor --request-timeout flag in K8s client config#121

Merged
basebandit merged 2 commits into
feat/streamable-httpfrom
feat/context-plumbing
May 12, 2026
Merged

feat(cluster): honor --request-timeout flag in K8s client config#121
basebandit merged 2 commits into
feat/streamable-httpfrom
feat/context-plumbing

Conversation

@basebandit
Copy link
Copy Markdown
Owner

Summary

  • Adds cluster.Option functional-option pattern with WithRequestTimeout(d) on cluster.Manager.
  • createClients now reads the timeout from the Manager instead of hardcoding 30s, so the user-facing --request-timeout flag is honored end-to-end.
  • cmd/kai/main.go passes cluster.WithRequestTimeout(requestTimeout) to cluster.New(...) alongside the existing kai.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 ./...
  • Manual: kai --request-timeout=2s ... against a slow endpoint should abort at ~2s.

Stacked on feat/streamable-http (#117).

@basebandit basebandit merged commit 63d6a01 into feat/streamable-http May 12, 2026
2 checks passed
@basebandit basebandit deleted the feat/context-plumbing branch May 12, 2026 09:22
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant