- 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
2.8 KiB
2.8 KiB
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:
cargo build --release
Run:
cargo run -- --context <context-name>
Required Validation Before PR
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:
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.gzkrust-x86_64-apple-darwin.tar.gzkrust-aarch64-apple-darwin.tar.gzSHA256SUMSkrust.rb
Homebrew tap sync requirement:
- secret
HOMEBREW_TAP_GITHUB_TOKENinkrustrepo 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 (
READMEordocs/*) 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