Select/Exclude KRM resources passed to KRM functions #5787
Labels
kind/feature
Categorizes issue or PR as related to a new feature.
needs-triage
Indicates an issue or PR lacks a `triage/foo` label and requires one.
Eschewed features
What would you like to have added?
Allow specifying a selector to include or exclude KRM resources passed to a KRM function in the
config.kubernetes.io/function
spec annotation. Something similar to how KPT lets you do that, https://kpt.dev/book/04-using-functions/01-declarative-function-execution?id=specifying-selectorsFor example, to only pass KRMs of kind
Deployment
:Or, to pass everything but all
Deployment
:select
&exclude
would naturally be mutually exclusive.Why is this needed?
Sometimes you only want KRM functions to run on a subset of resources.
Can you accomplish the motivating task without this feature, and if so, how?
Perhaps. Every KRM function would have to implement some kind of selector/exclude logic.
What other solutions have you considered?
A wrapper exec KRM function that does the filtering and then calls the original KRM function.
Anything else we should know?
No response
Feature ownership
The text was updated successfully, but these errors were encountered: