kubectl-slice
kubectl-slice copied to clipboard
Add support for "--filter"
Akin to --include-kind and --include-name and their --exclude-* counterparts (as well as #22), for more complex case scenarios it might be worth providing some sort of filtering where an expression is passed, and if the expression evaluates to true, then the fields are selected, otherwise they're excluded.
A good idea would be to look at implementing Google's Common Expression Language
Openly thinking about this, --filter would work differently than --include-* and --exclude-* since these can be passed multiple times, whereas filter, by having an expression, can fit any criteria.
Also thinking if #15 ever comes to life, there could be a place to add filtering right in the file, since a parameter might be just too large to put in a CLI call -- or won't look that pretty.
Open for thoughts from the community!
After over a year with no comments on this, I'm inclined to close it.
If you have a need for something like this, please do open a new issue!