Skip to content

feat: per-user mode through the Gameplane API and namespace-scoped break-glass - #5

Merged
ValgulNecron merged 3 commits into
mainfrom
feat/per-user-mode
Nov 22, 2026
Merged

ValgulNecron merged 3 commits into
mainfrom
feat/per-user-mode

Conversation

@ValgulNecron

Copy link
Copy Markdown
Contributor

Summary

Gameplane spec 037 (scope MCP server permissions), mcp repo part.

  • New internal/reader.Reader interface so tools no longer depend on a Kubernetes client directly.
  • Per-user mode: serve --panel-url (or GAMEPLANE_PANEL_URL) with GAMEPLANE_MCP_TOKEN reads through the Gameplane API (internal/panel), GET only, as the token's user. Optional cluster argument on every tool; with no cluster it fans out over every cluster the user may read and lists unavailable ones.
  • Break-glass mode: unchanged kubectl exec … serve, now limited by GAMEPLANE_MCP_NAMESPACES (out-of-scope namespace refused with "not in scope").
  • Tool names unchanged; existing tests untouched; new tests for the panel client, fan-out and the namespace allow-list.
  • README and specs.md describe both modes.

Needs the Gameplane API routes from the spec 037 API PR to be useful in per-user mode; break-glass works on its own.

Test plan

  • CI (shared go-component workflow): build, lint, tests, coverage.

Generated by Claude Code

…eak-glass

serve gains a per-user mode: with GAMEPLANE_PANEL_URL and a personal
GAMEPLANE_MCP_TOKEN it reads through the Gameplane API as the token's
user, GET only, across every cluster the user may read. Without a panel
URL it keeps reading Kubernetes directly, limited to the namespaces in
GAMEPLANE_MCP_NAMESPACES. Tool handlers now take a reader.Reader that
both clients implement. Tools gain optional cluster and server inputs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Claude <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e5b3cd12-ac6e-4e3c-a25b-103ad7e1ede7
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@ValgulNecron ValgulNecron self-assigned this Nov 22, 2026
The fake dynamic client sets its own resourceVersion on unrestricted lists,
so assert only that no skipped-namespaces note is present.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Claude <noreply@anthropic.com>
ValgulNecron pushed a commit to GameplanePanel/Gameplane that referenced this pull request Nov 22, 2026
The pointer moves only after GameplanePanel/mcp#5 merges, in #1046.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Claude <noreply@anthropic.com>
@ValgulNecron
ValgulNecron merged commit 59524ce into main Nov 22, 2026
6 checks passed
ValgulNecron pushed a commit to GameplanePanel/Gameplane that referenced this pull request Nov 22, 2026
…nePanel/mcp#5)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Claude <noreply@anthropic.com>
@ValgulNecron
ValgulNecron deleted the feat/per-user-mode branch November 24, 2026 00:04
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.

2 participants