Skip to content

Enable skipping pipeline steps based on some condition expression (CEL) #4388

@kispaljr

Description

@kispaljr

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/fn-runtimeKRM function runtimeenhancementNew feature or requesttriagedIssue has been triaged by adding an `area/` label

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions