Skip to content

docs: add kubectl plugin reference and provide chromium for docs tests through devbox - #33

Merged
bakito merged 1 commit into
projectcapsule:mainfrom
bakito:cli-docs
Nov 23, 2026
Merged

bakito merged 1 commit into
projectcapsule:mainfrom
bakito:cli-docs

Conversation

@bakito

@bakito bakito commented Nov 22, 2026

Copy link
Copy Markdown
Member

Summary

This PR adds a full reference page for the kubectl resource-permits plugin and links the existing guides to it. It also makes task docs:test:browser run without root or a separate browser install, using a Chromium that Devbox provides.

kubectl plugin documentation

  • New docs/content/docs/reference/cli.md covers:
    • Install: release archives (Linux/macOS/Windows, amd64/arm64, with checksums, SBOMs and cosign bundles), building from source with task build, and checking the version.
    • Cluster connection: kubeconfig lookup order (KUBECONFIG → in-cluster → ~/.kube/config), current context only, and no --kubeconfig/--context flags.
    • Global flags: -n, --as, --as-group, --version. A callout warns that --namespace defaults to default, not the namespace from the kubeconfig context.
    • Impersonation: how --as/--as-group affect approver matching, and the RBAC they need.
    • Commands: review, activate, expire, retry and completion, with required and resulting phases, flags, duration syntax (d/w units), conflict retries and examples.
    • Required permissions: get on resourcepermits and patch on resourcepermits/status, plus impersonate when used.
  • concepts/requests.md: replaced the inline build-from-source instructions with a pointer to the reference page.
  • examples/managed-grafana.md, examples/temporary-config.md: link to the plugin reference for installation.
  • reference/_index.md: the description now mentions the plugin reference.

Docs browser tests: Chromium from Devbox

Problem: task docs:test:browser failed unless task docs:browser:install had been run first. That task used playwright install --with-deps, which runs apt-get through sudo, so it needed root and only worked on Debian/Ubuntu.

Changes:

  • devbox.json / devbox.lock: add the versioned chromium package (155.0.8059.39) and export CHROMIUM_EXECUTABLE in init_hook. docs/playwright.config.js already uses this variable as the browser to launch.
  • Taskfile.yml: remove the redundant docs:browser:install task.
  • .github/workflows/docs.yml: CI runs only task docs:test:browser.
  • DEVELOPMENT.md: document where the browser comes from and that it has to stay close to the Playwright version.

Caveat: Playwright only guarantees support for the browser build it was released with. @playwright/test 1.64.0 targets Chromium 156, and the newest chromium in the Devbox index is 155. The full suite passes with 155. When @playwright/test is bumped, chromium may need a bump too.

Playwright's matching build (playwright-driver.browsers-chromium) is only available as a flake reference, not as a versioned Devbox package, so I used the regular package instead.

Testing

  • devbox run -- task docs:test:browser in a clean environment, with Playwright's own browser cache pointed at an empty directory so only the Devbox Chromium could be used: 30/30 passed (desktop, android, mobile), two runs.
  • actionlint and prek hooks (JSON, YAML, docs validation) pass on the changed files.

@bakito bakito changed the title docs: add cli documenatation docs: add kubectl plugin reference and provide Chromium for docs tests through Devbox Nov 22, 2026
@bakito bakito changed the title docs: add kubectl plugin reference and provide Chromium for docs tests through Devbox docs: add kubectl plugin reference and provide chromium for docs tests through devbox Nov 22, 2026
@bakito
bakito requested a review from oliverbaehler November 22, 2026 12:23
…s through devbox

Signed-off-by: bakito <github@bakito.ch>
@bakito
bakito merged commit 7920ffb into projectcapsule:main Nov 23, 2026
21 of 22 checks passed
@bakito
bakito deleted the cli-docs branch November 23, 2026 07:57
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