-
Notifications
You must be signed in to change notification settings - Fork 258
Description
Problem statement
As a kpt package author I want to be able to create a package with a pipeline step (KRM function) that is only executed if some condition based on the contents of the package is true.
E.g. I want to take different steps in the pipeline based on which type of secret management the package is configured to do.
Please note that this is different from filtering the KRM objects that a pipeline step is applied to (selectors and exclude fields).
Workarounds with the current version
I can write my own KRM function that evaluates the condition. However, if the step wouldn't need a custom KRM function otherwise (since I only want to do a set-annotation) this is very uncomfortable, and complicates my package unnecessary.
Possible solution
Add an "execution condition" field to the Pipeline schema, that can contain a CEL expression referencing the KRM objects in the package.