docs: split operator/contributor guides and sharpen README product scope
- rewrite README for operator-first onboarding with clear goal/approach intro - expand scope section with concrete supported resources and workflows - add docs/operator-guide.md for runtime usage, navigation, logs, secrets, and troubleshooting - add docs/contributor-guide.md for engineering standards, validation, and release responsibilities - simplify CONTRIBUTING.md into a concise entrypoint that links to the detailed contributor guide - remove docs/status.md and drop update-status job from release workflow
This commit is contained in:
1 parent
bfacc7c6f3
commit
a2b07f1e70
6 files changed
+347
-423
No files matched your search
@@ -415,55 +415,3 @@ jobs:
|
||||
git add Formula/krust.rb
|
||||
git commit -m "krust ${VERSION}"
|
||||
git push
|
||||
|
||||
update-status:
|
||||
name: Update status page
|
||||
needs: [prepare, publish, verify-release-assets, sync-homebrew-tap]
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout main
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: main
|
||||
|
||||
- name: Write docs/status.md
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
TAG="${{ needs.prepare.outputs.tag }}"
|
||||
VERSION="${{ needs.prepare.outputs.version }}"
|
||||
SHA="${{ needs.prepare.outputs.release_sha }}"
|
||||
DATE_UTC="$(date -u +"%Y-%m-%d %H:%M:%SZ")"
|
||||
RELEASE_URL="https://github.com/${{ github.repository }}/releases/tag/${TAG}"
|
||||
{
|
||||
printf '# Release Status\n\n'
|
||||
printf -- '- Latest release: `%s`\n' "${TAG}"
|
||||
printf -- '- SemVer: `%s`\n' "${VERSION}"
|
||||
printf -- '- Source commit: `%s`\n' "${SHA}"
|
||||
printf -- '- Published at (UTC): `%s`\n' "${DATE_UTC}"
|
||||
printf -- '- Release page: [%s](%s)\n' "${RELEASE_URL}" "${RELEASE_URL}"
|
||||
printf -- '- Pipeline run: [%s](%s)\n\n' \
|
||||
"${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
|
||||
"${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
||||
printf '## Artifacts\n\n'
|
||||
printf -- '- `%s`\n' "krust-x86_64-unknown-linux-gnu.tar.gz"
|
||||
printf -- '- `%s`\n' "krust-x86_64-apple-darwin.tar.gz"
|
||||
printf -- '- `%s`\n' "krust-aarch64-apple-darwin.tar.gz"
|
||||
printf -- '- `%s`\n' "SHA256SUMS"
|
||||
printf -- '- `%s`\n' "krust.rb"
|
||||
} > docs/status.md
|
||||
|
||||
- name: Commit status page
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
if git diff --quiet -- docs/status.md; then
|
||||
echo "No status update needed"
|
||||
exit 0
|
||||
fi
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
git add docs/status.md
|
||||
git commit -m "docs(status): update for ${{ needs.prepare.outputs.tag }} [skip ci]"
|
||||
git push origin HEAD:main
|
||||
+20
-111
@@ -1,125 +1,34 @@
|
||||
# Contributing to krust
|
||||
|
||||
Thanks for contributing to `krust`.
|
||||
Thanks for contributing.
|
||||
|
||||
This project is built for operators running large Kubernetes estates, so performance and operational clarity are non-negotiable.
|
||||
For the full engineering standards and maintainer workflow, read:
|
||||
- [Contributor Guide](docs/contributor-guide.md)
|
||||
|
||||
## Principles
|
||||
## Quick Start for Contributors
|
||||
|
||||
When proposing changes, optimize for these outcomes:
|
||||
1. Fork and clone the repo.
|
||||
2. Create a focused branch.
|
||||
3. Make changes with tests/docs updates.
|
||||
4. Run required validation.
|
||||
5. Open a PR with clear behavior and performance notes.
|
||||
|
||||
- low input-to-render latency under churn
|
||||
- controlled Kubernetes API pressure
|
||||
- bounded memory growth
|
||||
- predictable, keyboard-first UX
|
||||
- clear behavior under RBAC/auth/network failures
|
||||
|
||||
If a feature conflicts with these principles, prefer the simpler and faster path.
|
||||
|
||||
## Development Setup
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- Rust stable toolchain
|
||||
- kubeconfig with at least one working context
|
||||
- macOS or Linux environment
|
||||
|
||||
### Clone and build
|
||||
|
||||
```bash
|
||||
git clone git@github.com:ErfanY/krust.git
|
||||
cd krust
|
||||
cargo build --release
|
||||
```
|
||||
|
||||
Run locally:
|
||||
|
||||
```bash
|
||||
cargo run -- --context <context-name>
|
||||
```
|
||||
|
||||
## Required Validation Pipeline
|
||||
|
||||
Run this sequence before opening or updating a PR:
|
||||
## Required Validation
|
||||
|
||||
```bash
|
||||
cargo fmt --all
|
||||
cargo check
|
||||
cargo test
|
||||
cargo build --release
|
||||
cargo check --locked
|
||||
cargo test --locked
|
||||
cargo build --release --locked
|
||||
```
|
||||
|
||||
The CI pipeline enforces the same flow.
|
||||
## PR Expectations
|
||||
|
||||
## Code and Design Expectations
|
||||
- preserve keybinding and command behavior unless explicitly changing compatibility
|
||||
- explain performance impact for hot-path changes
|
||||
- include tests for changed behavior
|
||||
- update docs for user-visible behavior changes
|
||||
|
||||
## Performance-sensitive changes
|
||||
## Security
|
||||
|
||||
If your change touches watchers, projection, rendering, or logs, include in your PR description:
|
||||
|
||||
- what hot path changed
|
||||
- expected complexity/cost impact
|
||||
- API watch/list pressure impact
|
||||
- memory impact and bounds
|
||||
- failure-mode behavior (RBAC/auth/disconnect)
|
||||
|
||||
Use [`docs/performance.md`](docs/performance.md) as the baseline.
|
||||
|
||||
## API/watch behavior
|
||||
|
||||
- avoid eager all-context/all-kind watchers by default
|
||||
- prefer active-scope/lazy activation
|
||||
- keep reconnect logic bounded
|
||||
- treat RBAC denials as expected operational state
|
||||
|
||||
## UX behavior
|
||||
|
||||
- preserve existing keybindings unless explicitly changing compatibility behavior
|
||||
- avoid introducing mode ambiguities
|
||||
- keep detail/log scrolling and search behavior predictable
|
||||
|
||||
## Testing Guidance
|
||||
|
||||
Add or update tests when changing behavior:
|
||||
|
||||
- unit tests for parsing, formatting, and helper logic
|
||||
- state/projection tests when list or sorting behavior changes
|
||||
- UI behavior tests for keybinding and pane semantics
|
||||
|
||||
Performance benchmark tests can be added as ignored tests.
|
||||
|
||||
## Pull Request Checklist
|
||||
|
||||
Before requesting review, verify:
|
||||
|
||||
- [ ] `cargo fmt --all`
|
||||
- [ ] `cargo check`
|
||||
- [ ] `cargo test`
|
||||
- [ ] `cargo build --release`
|
||||
- [ ] docs updated (`README`/`docs/*`) for user-visible changes
|
||||
- [ ] performance notes included for hot-path changes
|
||||
|
||||
## Commit Style
|
||||
|
||||
Use imperative commit titles and keep scope tight.
|
||||
|
||||
Good examples:
|
||||
|
||||
- `ui: clamp detail scroll bounds for wrapped views`
|
||||
- `cluster: disable forbidden watchers per context/kind`
|
||||
- `docs: add performance tuning guide`
|
||||
|
||||
## Security and Sensitive Data
|
||||
|
||||
- never commit kubeconfigs, tokens, certificates, or customer data
|
||||
- redact cluster/account identifiers from logs/screenshots in PRs where possible
|
||||
- for sensitive reports, contact maintainers privately
|
||||
|
||||
## Need help?
|
||||
|
||||
Open an issue with:
|
||||
|
||||
- expected behavior
|
||||
- current behavior
|
||||
- reproducible steps
|
||||
- environment (`krust` version, OS, Kubernetes version)
|
||||
Do not commit kubeconfigs, tokens, certificates, or sensitive cluster data.
|
||||
@@ -4,72 +4,33 @@
|
||||
[](https://github.com/ErfanY/krust/actions/workflows/release.yml)
|
||||
[](LICENSE)
|
||||
[](https://kubernetes.io/)
|
||||
[Release Status](docs/status.md)
|
||||
|
||||
`krust` is a latency-first Kubernetes terminal navigator for operators who work across many clusters and large resource sets.
|
||||
`krust` is a latency-first Kubernetes terminal navigator for operators managing many clusters and high resource volume.
|
||||
|
||||
It is intentionally focused on fast core workflows (navigation, inspect, logs, safe edits/actions) with high k9s shortcut compatibility, while keeping API pressure and UI jitter under control.
|
||||
It focuses on fast navigation, inspect, logs, and safe actions, with high k9s command/keybinding compatibility for Kubernetes-native workflows.
|
||||
|
||||
Built with Rust (`tokio`, `kube`, `kube_runtime`, `ratatui`) and compiled against Kubernetes `1.33+` APIs (`k8s-openapi` `v1_33`).
|
||||
## Goal and Approach
|
||||
|
||||
## Why krust
|
||||
Goal:
|
||||
- stay responsive for power users across many contexts and large object sets
|
||||
- provide Kubernetes-native terminal workflows without plugin complexity
|
||||
|
||||
Most terminal Kubernetes tools become noisy or sluggish when context count and watch volume grow. `krust` is designed around a different default:
|
||||
Approach:
|
||||
- lazy scope activation instead of watch-everything startup
|
||||
- bounded state/update pipelines to avoid UI jitter under churn
|
||||
- keyboard-first interaction with high k9s compatibility
|
||||
- explicit RBAC/auth error handling and guarded mutation paths
|
||||
|
||||
- activate only the watch scope needed for what you are currently looking at
|
||||
- keep render work invalidation-driven with a frame cap
|
||||
- keep logs bounded and stream-focused
|
||||
- treat RBAC denials and API turbulence as normal operational states
|
||||
## Install
|
||||
|
||||
This is also why plugins are out of scope for v1: predictable latency and operational clarity come first.
|
||||
### Homebrew
|
||||
|
||||
## Scope and Non-Goals
|
||||
```bash
|
||||
brew tap ErfanY/krust
|
||||
brew install krust
|
||||
```
|
||||
|
||||
What `krust` is:
|
||||
|
||||
- keyboard-first multi-context Kubernetes navigator
|
||||
- read-heavy operations with guarded mutations
|
||||
- high-signal terminal UI for SRE/platform workflows
|
||||
|
||||
What `krust` is not:
|
||||
|
||||
- a plugin/script execution platform
|
||||
- a replacement for full GitOps pipelines or IDE workflows
|
||||
- a "watch everything everywhere" cluster crawler at startup
|
||||
|
||||
## Feature Matrix
|
||||
|
||||
| Area | Status | Notes |
|
||||
| --- | --- | --- |
|
||||
| Multi-context session | Implemented | Context tabs with fast switching and warm-context retention |
|
||||
| Namespace scoping | Implemented | Namespace picker and `all` namespace mode |
|
||||
| Core resource browser | Implemented | Pods, Deployments, RS, STS, DS, Services, Ingresses, ConfigMaps, Secrets, Jobs, CronJobs, PVC/PV, Nodes, Namespaces, Events, SA, Roles, RB/CR/CRB, NetPol, HPA, PDB |
|
||||
| Describe pane | Implemented | YAML/JSON view toggle with syntax highlighting |
|
||||
| Secret decode pane | Implemented | Decoded view + edit/apply with automatic base64 re-encode |
|
||||
| Logs pane | Implemented | Streaming with pause/tail/source filtering; pod multi-container and deploy/rs replica fan-out |
|
||||
| Edit/apply | Implemented | External editor flow from describe/decode panes |
|
||||
| Delete action | Implemented | Guarded delete path (currently Pods) |
|
||||
| k9s-style commands/aliases | Partial parity | Core resource commands and navigation implemented; plugin commands intentionally out of scope |
|
||||
| Plugin subsystem | Out of scope | Deliberately excluded for performance and simplicity |
|
||||
|
||||
## Compatibility
|
||||
|
||||
- OS: macOS, Linux
|
||||
- Kubernetes: `1.33+`
|
||||
- Auth: standard kubeconfig + exec auth providers
|
||||
- Terminal: basic color through truecolor; OSC52 clipboard fallback supported
|
||||
|
||||
## Installation and Quick Start
|
||||
|
||||
### Install from GitHub Releases (recommended)
|
||||
|
||||
Prebuilt archives are published for:
|
||||
|
||||
- `x86_64-unknown-linux-gnu`
|
||||
- `x86_64-apple-darwin`
|
||||
- `aarch64-apple-darwin`
|
||||
|
||||
Example (Linux x86_64):
|
||||
### Prebuilt binaries
|
||||
|
||||
```bash
|
||||
curl -L -o krust.tar.gz \
|
||||
@@ -79,212 +40,53 @@ tar -xzf krust.tar.gz
|
||||
sudo install krust-x86_64-unknown-linux-gnu/krust /usr/local/bin/krust
|
||||
```
|
||||
|
||||
### Install from source
|
||||
### From source
|
||||
|
||||
```bash
|
||||
cargo install --git https://github.com/ErfanY/krust.git --locked krust
|
||||
```
|
||||
|
||||
### Homebrew (tap-based)
|
||||
|
||||
```bash
|
||||
brew tap ErfanY/krust
|
||||
brew install krust
|
||||
```
|
||||
|
||||
### Build locally
|
||||
|
||||
```bash
|
||||
cargo build --release
|
||||
```
|
||||
|
||||
Binary path:
|
||||
|
||||
```bash
|
||||
target/release/krust
|
||||
```
|
||||
|
||||
### Publish a GitHub release
|
||||
|
||||
Main-branch publish (default):
|
||||
|
||||
```bash
|
||||
git push origin main
|
||||
```
|
||||
|
||||
On each push to `main`, the `Release` workflow will:
|
||||
- run validation (`fmt`, `check`, `test`, `build`)
|
||||
- compute the next semver (`major` on `BREAKING CHANGE`/`!`, `minor` on `feat:`, otherwise `patch`)
|
||||
- bump package version in `Cargo.toml`
|
||||
- create and push the release tag
|
||||
- build and upload release artifacts
|
||||
- verify required release assets are present on GitHub Releases
|
||||
- sync latest formula to Homebrew tap (`ErfanY/homebrew-krust`)
|
||||
- update `docs/status.md`
|
||||
|
||||
Manual publish override:
|
||||
|
||||
- Run Actions workflow `Release`
|
||||
- Provide `version` (`0.1.0` or `v0.1.0`)
|
||||
|
||||
The workflow builds platform artifacts, publishes a GitHub Release, uploads:
|
||||
- `krust-*.tar.gz`
|
||||
- `SHA256SUMS`
|
||||
- `krust.rb`
|
||||
|
||||
### Run
|
||||
## Quick Start
|
||||
|
||||
```bash
|
||||
krust
|
||||
krust --context <context-name>
|
||||
krust --namespace <namespace>
|
||||
krust --readonly
|
||||
krust --kubeconfig <path>
|
||||
krust --all-contexts
|
||||
```
|
||||
|
||||
### CLI flags
|
||||
## Compatibility
|
||||
|
||||
- `--context`: initial context
|
||||
- `--namespace`: initial namespace scope
|
||||
- `--readonly`: disable mutations
|
||||
- `--kubeconfig`: explicit kubeconfig path
|
||||
- `--all-contexts`: eager auth/client warmup across all contexts
|
||||
- OS: macOS, Linux
|
||||
- Kubernetes: 1.33+
|
||||
- Auth: kubeconfig + exec auth providers
|
||||
|
||||
## Configuration
|
||||
## Documentation
|
||||
|
||||
Runtime/UI config path:
|
||||
- [Operator Guide](docs/operator-guide.md)
|
||||
- [Contributor Guide](docs/contributor-guide.md)
|
||||
- [Architecture](docs/architecture.md)
|
||||
- [Performance Guide](docs/performance.md)
|
||||
- [Contributing](CONTRIBUTING.md)
|
||||
|
||||
- `~/.config/krust/config.toml`
|
||||
## Scope
|
||||
|
||||
Keymap override path:
|
||||
Available now:
|
||||
- Multi-context workflow with fast context switching and namespace scoping (`all` namespace supported)
|
||||
- Kubernetes resource browser for:
|
||||
pods, deployments, replicasets, statefulsets, daemonsets, services, ingresses, configmaps, secrets, jobs, cronjobs, pvc/pv, nodes, namespaces, events, serviceaccounts, roles/rolebindings/clusterroles/clusterrolebindings, networkpolicies, hpa, pdb
|
||||
- Describe/detail pane with YAML/JSON toggle, syntax highlighting, vim-style search, and wrap/horizontal scroll modes
|
||||
- Logs pane with stream, tail, pause, source filtering, container selection, and multi-pod fan-in for deployment/replicaset views
|
||||
- Secret decode view in YAML, with edit/apply support and automatic re-encode on apply
|
||||
- Guarded mutation flows (for example delete) plus read-only mode (`--readonly`)
|
||||
- k9s-style command and keybinding compatibility for Kubernetes-native workflows (plugin commands excluded)
|
||||
- Performance-oriented behavior for large clusters:
|
||||
lazy watch activation, bounded update pipelines, render invalidation, and RBAC-aware watch suppression
|
||||
|
||||
- `~/.config/krust/keymap.toml`
|
||||
|
||||
Example `config.toml`:
|
||||
|
||||
```toml
|
||||
[runtime]
|
||||
fps_limit = 60
|
||||
delta_channel_capacity = 2048
|
||||
warm_contexts = 1
|
||||
warm_context_ttl_secs = 20
|
||||
|
||||
[ui]
|
||||
theme = "default"
|
||||
show_help = true
|
||||
```
|
||||
|
||||
Defaults for initial context/namespace come from kubeconfig unless CLI flags override them.
|
||||
|
||||
## Quick UX Reference
|
||||
|
||||
### Core navigation
|
||||
|
||||
- `tab` / `shift+tab`: switch context tabs
|
||||
- `j` / `k` (or arrows): move in tables, scroll in detail panes
|
||||
- `Enter`: select namespace in namespace view, otherwise open describe
|
||||
- `d`: describe
|
||||
- `ctrl+d`: delete (guarded)
|
||||
- `x`: secret decode view toggle
|
||||
- `l`: logs pane
|
||||
- `s`: log tail toggle
|
||||
- `p`: pause/resume logs
|
||||
- `S`: log source selector
|
||||
- `c`: container selector
|
||||
|
||||
### Search and command bar
|
||||
|
||||
- `/`: filter in table/overlay panes, search in detail/log panes
|
||||
- `?`: detail/search shortcut
|
||||
- `n` / `N`: next/previous search match in detail/log panes
|
||||
- `:`: command mode (`:ctx`, `:ns`, `:po`, `:kind`, `:edit`, `:fmt`, etc.)
|
||||
- `tab` in command mode: autocomplete
|
||||
- `ctrl+w` in command/filter mode: delete previous word
|
||||
|
||||
### Detail viewing
|
||||
|
||||
- `w`: wrap toggle
|
||||
- left/right: horizontal scroll (wrap off)
|
||||
- `gg` / `G`: top/bottom
|
||||
- `ctrl+u` / `ctrl+d`: half-page up/down
|
||||
- `y`: copy current view
|
||||
- `:dump <path>`: write current view to file
|
||||
|
||||
### Format and edit
|
||||
|
||||
- `:fmt yaml|json` or `:yaml` / `:json`
|
||||
- `e` or `:edit [yaml|json]`
|
||||
|
||||
## Architecture Overview
|
||||
|
||||
`krust` uses a layered architecture to isolate cluster IO, state mutation, projection, and rendering.
|
||||
|
||||
```mermaid
|
||||
flowchart LR
|
||||
A["Kubernetes API\n(list/watch/logs/actions)"] --> B["ResourceProvider\nwatch + stream + action adapters"]
|
||||
B --> C["StateDelta channel\n(bounded)"]
|
||||
C --> D["StateStore\nnormalized entities + indexes"]
|
||||
D --> E["ViewProjector\nactive-view projection"]
|
||||
E --> F["TUI Renderer\ninvalidated draws + FPS cap"]
|
||||
F --> G["Operator Input\nkeys, commands, filters"]
|
||||
G --> E
|
||||
G --> B
|
||||
```
|
||||
|
||||
Design details are documented in:
|
||||
|
||||
- [`docs/architecture.md`](docs/architecture.md)
|
||||
- [`docs/performance.md`](docs/performance.md)
|
||||
|
||||
## Performance Model (Operator-Facing)
|
||||
|
||||
`krust` prioritizes consistent interactivity over maximum background data ingestion.
|
||||
|
||||
- watch scope is reconciled to active context/pane needs
|
||||
- recently used contexts can stay warm with TTL
|
||||
- render loop is invalidation-driven with FPS cap
|
||||
- logs are ring-buffered with source filtering and bounded drain
|
||||
- forbidden RBAC watches are disabled for that context/resource (no retry floods)
|
||||
|
||||
For deeper technical details and tuning guidance, see [`docs/performance.md`](docs/performance.md).
|
||||
|
||||
## Safety Model
|
||||
|
||||
- `--readonly` blocks mutating actions
|
||||
- destructive action path is confirmation-guarded
|
||||
- RBAC/action failures are surfaced with explicit status messaging
|
||||
- secret decode editing converts decoded values back to base64 automatically
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### `403 Forbidden` warnings for some resources
|
||||
|
||||
This is usually expected RBAC scope mismatch. `krust` disables forbidden watchers for that resource/context to avoid reconnect storms.
|
||||
|
||||
### Long startup with many contexts
|
||||
|
||||
Default mode is lazy. If startup still feels heavy, avoid `--all-contexts` and keep `warm_contexts` low.
|
||||
|
||||
### Clipboard copy issues
|
||||
|
||||
`krust` uses platform-native commands first (`pbcopy` / `wl-copy` / `xclip` / `xsel`) and falls back to OSC52 where supported.
|
||||
|
||||
### Auth works in shell but not in app environment
|
||||
|
||||
Ensure your terminal session has the same kube auth env/credentials as your shell where `kubectl` succeeds.
|
||||
|
||||
## Contributing
|
||||
|
||||
Contribution guide, PR standards, and performance review expectations live in [`CONTRIBUTING.md`](CONTRIBUTING.md).
|
||||
|
||||
## Roadmap (Near Term)
|
||||
|
||||
- wider mutation action set (scale/restart/etc.) with guardrails
|
||||
- richer event correlation for non-Event resources
|
||||
- expanded integration and load benchmarks
|
||||
- continued k9s command/keybinding compatibility tightening
|
||||
Explicitly out of scope:
|
||||
- Plugin subsystem
|
||||
- Non-Kubernetes plugin commands
|
||||
|
||||
## License
|
||||
|
||||
MIT. See [`LICENSE`](LICENSE).
|
||||
MIT. See [LICENSE](LICENSE).
|
||||
@@ -0,0 +1,123 @@
|
||||
# krust Contributor Guide
|
||||
|
||||
This guide is for contributors and maintainers.
|
||||
|
||||
## Engineering Principles
|
||||
|
||||
All changes should preserve:
|
||||
|
||||
- low interactive latency
|
||||
- bounded resource usage (CPU/memory/channels)
|
||||
- controlled Kubernetes API pressure
|
||||
- predictable keyboard UX
|
||||
- explicit behavior under RBAC/auth/disconnect failures
|
||||
|
||||
If there is a tradeoff, prefer the simpler and faster path.
|
||||
|
||||
## Local Setup
|
||||
|
||||
Requirements:
|
||||
- Rust stable
|
||||
- macOS or Linux
|
||||
- working kubeconfig context (for manual runtime checks)
|
||||
|
||||
Build:
|
||||
|
||||
```bash
|
||||
cargo build --release
|
||||
```
|
||||
|
||||
Run:
|
||||
|
||||
```bash
|
||||
cargo run -- --context <context-name>
|
||||
```
|
||||
|
||||
## Required Validation Before PR
|
||||
|
||||
```bash
|
||||
cargo fmt --all
|
||||
cargo check --locked
|
||||
cargo test --locked
|
||||
cargo build --release --locked
|
||||
```
|
||||
|
||||
## Code Review Focus
|
||||
|
||||
Review for:
|
||||
- behavior regressions in keybindings/commands
|
||||
- API watch/list pressure changes
|
||||
- render-path complexity increases
|
||||
- unbounded buffers/retries/backlogs
|
||||
- RBAC failure behavior and retry handling
|
||||
|
||||
## Performance-Sensitive Areas
|
||||
|
||||
Treat changes in these areas as high-risk and document impact in PR description:
|
||||
|
||||
- watch lifecycle and activation scope
|
||||
- state store indexing and delta fanout
|
||||
- projection/filter/sort paths
|
||||
- TUI render invalidation
|
||||
- logs buffering and stream fan-in
|
||||
|
||||
Reference baseline:
|
||||
- [Performance Guide](performance.md)
|
||||
- [Architecture](architecture.md)
|
||||
|
||||
## Testing Guidance
|
||||
|
||||
When behavior changes, add/update tests for:
|
||||
|
||||
- parser/format helper logic
|
||||
- projection and sorting behavior
|
||||
- keybinding and pane semantics
|
||||
- search/navigation behavior in detail/log panes
|
||||
|
||||
Use ignored tests for heavy perf benchmarks.
|
||||
|
||||
## Release Pipeline (Maintainers)
|
||||
|
||||
The `Krust / Release` workflow is the release path on `main`.
|
||||
|
||||
It performs:
|
||||
- validation (`fmt`, `check`, `test`, `build`)
|
||||
- semver bump inference
|
||||
- manifest/lock update commit
|
||||
- tag creation
|
||||
- artifact packaging and GitHub Release publish
|
||||
- release asset verification
|
||||
- Homebrew tap formula sync
|
||||
|
||||
Release assets expected on each release:
|
||||
- `krust-x86_64-unknown-linux-gnu.tar.gz`
|
||||
- `krust-x86_64-apple-darwin.tar.gz`
|
||||
- `krust-aarch64-apple-darwin.tar.gz`
|
||||
- `SHA256SUMS`
|
||||
- `krust.rb`
|
||||
|
||||
Homebrew tap sync requirement:
|
||||
- secret `HOMEBREW_TAP_GITHUB_TOKEN` in `krust` repo Actions secrets
|
||||
- token needs write access to `ErfanY/homebrew-krust`
|
||||
|
||||
Without this secret, release currently fails by design.
|
||||
|
||||
## Pull Request Checklist
|
||||
|
||||
- [ ] Validation commands pass locally
|
||||
- [ ] user-facing docs updated (`README` or `docs/*`) when behavior changes
|
||||
- [ ] tests updated for changed behavior
|
||||
- [ ] performance impact called out for hot-path changes
|
||||
- [ ] no secrets/credentials added
|
||||
|
||||
## Security
|
||||
|
||||
Never commit:
|
||||
- kubeconfig files
|
||||
- tokens/certs
|
||||
- production identifiers that should stay private
|
||||
|
||||
## Related Docs
|
||||
|
||||
- [Contributing entrypoint](../CONTRIBUTING.md)
|
||||
- [Operator Guide](operator-guide.md)
|
||||
@@ -0,0 +1,158 @@
|
||||
# krust Operator Guide
|
||||
|
||||
This guide is for cluster operators and SREs using `krust` day-to-day.
|
||||
|
||||
## What krust is optimized for
|
||||
|
||||
- low keypress-to-render latency
|
||||
- high resource counts and multi-context sessions
|
||||
- keyboard-first Kubernetes workflows
|
||||
- predictable behavior under RBAC/API/auth failures
|
||||
|
||||
## Run Modes
|
||||
|
||||
Default mode:
|
||||
|
||||
```bash
|
||||
krust
|
||||
```
|
||||
|
||||
Target a context:
|
||||
|
||||
```bash
|
||||
krust --context <context-name>
|
||||
```
|
||||
|
||||
Target a namespace:
|
||||
|
||||
```bash
|
||||
krust --namespace <namespace>
|
||||
```
|
||||
|
||||
Read-only mode:
|
||||
|
||||
```bash
|
||||
krust --readonly
|
||||
```
|
||||
|
||||
Use custom kubeconfig:
|
||||
|
||||
```bash
|
||||
krust --kubeconfig <path>
|
||||
```
|
||||
|
||||
Warm all contexts at startup (heavier):
|
||||
|
||||
```bash
|
||||
krust --all-contexts
|
||||
```
|
||||
|
||||
## Core Navigation
|
||||
|
||||
- `tab` / `shift+tab`: switch context tabs
|
||||
- `j` / `k` (or arrows): move selection and scroll
|
||||
- `Enter`: select namespace in namespace view; otherwise open describe
|
||||
- `d`: describe selected resource
|
||||
- `ctrl+d`: delete (guarded)
|
||||
- `esc`: clear active filter/search prompt
|
||||
|
||||
## Logs and Runtime Inspect
|
||||
|
||||
- `l`: open logs pane
|
||||
- `s`: tail toggle
|
||||
- `p`: pause/resume stream
|
||||
- `S`: source selector
|
||||
- `c`: container selector
|
||||
|
||||
Pod behavior:
|
||||
- multi-container pods can stream from all containers
|
||||
|
||||
Controller behavior:
|
||||
- deployment/replicaset selections can stream from all selected replica pods
|
||||
|
||||
## Search and Command UX
|
||||
|
||||
- `/`: filter in list/overlay panes, search in detail/log panes
|
||||
- `?`: detail/search shortcut
|
||||
- `n` / `N`: next/previous match in detail/log panes
|
||||
- `:`: command mode
|
||||
- `tab` in command mode: autocomplete
|
||||
- `ctrl+w` in command/filter mode: delete previous word
|
||||
|
||||
Common command mode entries:
|
||||
- `:ctx` contexts
|
||||
- `:ns` namespaces
|
||||
- `:po`, `:deploy`, `:svc`, `:ing`, `:cm`, `:sec`, etc.
|
||||
- `:fmt yaml|json`
|
||||
- `:edit [yaml|json]`
|
||||
|
||||
## Detail Pane Behavior
|
||||
|
||||
- `w`: wrap toggle
|
||||
- left/right: horizontal scroll when wrap is off
|
||||
- `gg` / `G`: top/bottom
|
||||
- `ctrl+u` / `ctrl+d`: half-page up/down
|
||||
- `y`: copy visible/current detail content
|
||||
|
||||
Detail supports:
|
||||
- syntax highlighting for YAML/JSON
|
||||
- vim-style in-pane search navigation
|
||||
- current-match highlighting separate from other matches
|
||||
|
||||
## Secrets
|
||||
|
||||
- `x`: toggle decoded secret view when on a Secret
|
||||
- decoded view shows decoded values in YAML
|
||||
- edit from decoded view re-encodes values to base64 on apply
|
||||
- edit from raw describe expects base64 input
|
||||
|
||||
## Configuration
|
||||
|
||||
Paths:
|
||||
- `~/.config/krust/config.toml`
|
||||
- `~/.config/krust/keymap.toml`
|
||||
|
||||
Example:
|
||||
|
||||
```toml
|
||||
[runtime]
|
||||
fps_limit = 60
|
||||
delta_channel_capacity = 2048
|
||||
warm_contexts = 1
|
||||
warm_context_ttl_secs = 20
|
||||
|
||||
[ui]
|
||||
theme = "default"
|
||||
show_help = true
|
||||
```
|
||||
|
||||
Defaults for initial context/namespace follow kubeconfig unless overridden by CLI flags.
|
||||
|
||||
## Safety Model
|
||||
|
||||
- `--readonly` blocks mutating actions
|
||||
- delete/action flows are confirmation guarded
|
||||
- RBAC/auth/network errors are surfaced in UI status messaging
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
403 warnings:
|
||||
- expected when RBAC does not allow a resource scope
|
||||
- `krust` suppresses retry storms for forbidden watches
|
||||
|
||||
Slow startup:
|
||||
- avoid `--all-contexts` unless needed
|
||||
- reduce `warm_contexts`
|
||||
|
||||
Clipboard issues:
|
||||
- tries `pbcopy`/`wl-copy`/`xclip`/`xsel`, then OSC52 fallback
|
||||
|
||||
Auth mismatch vs shell:
|
||||
- run from shell session where `kubectl` is already working
|
||||
- ensure exec auth dependencies are available in PATH
|
||||
|
||||
## Related Docs
|
||||
|
||||
- [Architecture](architecture.md)
|
||||
- [Performance Guide](performance.md)
|
||||
- [Contributor Guide](contributor-guide.md)
|
||||
@@ -1,16 +0,0 @@
|
||||
# Release Status
|
||||
|
||||
- Latest release: `v0.1.2`
|
||||
- SemVer: `0.1.2`
|
||||
- Source commit: `df5aae17c9db0480275d2b26a5bd33ec7e20c690`
|
||||
- Published at (UTC): `2026-03-08 13:00:51Z`
|
||||
- Release page: [https://github.com/ErfanY/krust/releases/tag/v0.1.2](https://github.com/ErfanY/krust/releases/tag/v0.1.2)
|
||||
- Pipeline run: [https://github.com/ErfanY/krust/actions/runs/22821308685](https://github.com/ErfanY/krust/actions/runs/22821308685)
|
||||
|
||||
## Artifacts
|
||||
|
||||
- `krust-x86_64-unknown-linux-gnu.tar.gz`
|
||||
- `krust-x86_64-apple-darwin.tar.gz`
|
||||
- `krust-aarch64-apple-darwin.tar.gz`
|
||||
- `SHA256SUMS`
|
||||
- `krust.rb`
|
||||
Reference in new issue
Block a user