Skip to content

kubectl: named rules (needs lowfat 0.9.0) - #2

Merged
zdk merged 1 commit into
mainfrom
feat/kubectl-named-rules
Oct 9, 2026
Merged

zdk merged 1 commit into
mainfrom
feat/kubectl-named-rules

Conversation

@zdk

@zdk zdk commented Oct 9, 2026

Copy link
Copy Markdown
Owner

What changes

  • kubectl-compact is rewritten with named rule blocks. Failed commands and -o json are handled once for every subcommand, and the YAML pruning is written once per level.
  • apply, delete, events and logs now honor -o: JSON is truncated as JSON, other formats pass through raw. Before, they were cut with head or tail.
  • README states the minimum lowfat version and adds a named rule primer.
  • kubectl-compact bumped to 0.7.0.

Testing

  • Compared old and new filters over 3,120 cases in a Linux container. Output is identical for get, describe, unknown subcommands and all failed commands. The 460 differing cases are the -o change above.
  • lowfat plugin bench kubectl-compact is unchanged at 33%.

Merge order

Merge only after lowfat 0.9.0 is released (zdk/lowfat#22). Older lowfat cannot parse rule blocks.

- failed commands and -o json handled once for every subcommand
- YAML pruning written once per level
- apply, delete, events, logs now honor -o: json is truncated, other formats pass raw
- README: minimum lowfat version, named rule primer
- bump kubectl-compact to 0.7.0
@zdk
zdk merged commit 1e78f47 into main Oct 9, 2026
@zdk zdk mentioned this pull request Oct 9, 2026
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