Tekton PipelineRun Trigger

Tekton PipelineRun Trigger

Certified

Trigger on completed Tekton PipelineRuns

Polls terminal PipelineRuns and stores a namespace KV Store watermark to avoid duplicate executions.

yaml
type: io.kestra.plugin.tekton.pipelinerun.Trigger

React when a PipelineRun finishes.

yaml
id: tekton_finished
namespace: company.team

triggers:
  - id: run_finished
    type: io.kestra.plugin.tekton.pipelinerun.Trigger
    namespace: ci
    labelSelector: tekton.dev/pipeline=build-and-test
    interval: PT1M

tasks:
  - id: log
    type: io.kestra.plugin.core.log.Log
    message: "PipelineRun {{ trigger.name }} ended with {{ trigger.status }}"
Properties
Defaultfalse

Specifies whether a trigger is allowed to start a new execution even if a previous run is still in progress.

Kubernetes connection

Connection settings for the Kubernetes cluster. When omitted, Fabric8 discovers credentials from system properties, environment variables, kubeconfig, or the in-cluster service account.

Definitions
apiVersionstring
Defaultv1

API version

API group version used by the client. Default v1.

caCertDatastring

CA certificate data

Base64-encoded PEM CA bundle. Whitespace is stripped automatically.

caCertFilestring

CA certificate file

Path to a PEM CA bundle.

clientCertDatastring

Client certificate data

Base64-encoded client cert. Whitespace is stripped automatically.

clientCertFilestring

Client certificate file

clientKeyAlgostring
DefaultRSA

Client key algorithm

Algorithm for the client key. Default RSA.

clientKeyDatastring

Client key data

Base64-encoded client key. Whitespace is stripped automatically.

clientKeyFilestring

Client key file

clientKeyPassphrasestring

Client key passphrase

disableHostnameVerificationbooleanstring

Disable hostname verification

Disables TLS hostname checks. Avoid in production clusters.

enableHttp2booleanstring

Enable HTTP/2

Off by default (HTTP/1.1, the prior behavior). Enable to use HTTP/2, which keeps long-lived watch/log streams alive better through proxies like GKE konnectivity.

keyStoreFilestring

Keystore file

keyStorePassphrasestring

Keystore passphrase

masterUrlstring
Defaulthttps://kubernetes.default.svc

Kubernetes API URL

API server endpoint. Default https://kubernetes.default.svc.

maxConcurrentRequestsintegerstring

Max concurrent HTTP requests

Caps total concurrent HTTP requests issued by this client. Lower this when running many concurrent tasks against a rate-limited API server (e.g. GKE). Fabric8 default: 64.

maxConcurrentRequestsPerHostintegerstring

Max concurrent HTTP requests per host

Caps concurrent HTTP requests to a single host (the API server). Fabric8 default: 5.

namespacestring

Default namespace

Namespace used when resources omit a namespace.

oauthTokenstring

OAuth token

oauthTokenProvider

Dynamically refreshes the OAuth token used to authenticate with the Kubernetes API. Use this when authenticating via a cloud provider (e.g. GCP, AWS, Azure) whose tokens are short-lived (typically 1 hour). Without this, long-running tasks will fail with an unauthorized error once the initial token expires. The provider executes a Kestra task to fetch a fresh token each time the Kubernetes client needs to re-authenticate.

Dynamically refreshes an OAuth token by executing a Kestra task each time the Kubernetes client needs to authenticate. This is essential for cloud providers (e.g. GCP, AWS, Azure) whose tokens are short-lived (typically 1 hour). Without automatic refresh, long-running tasks will fail with an unauthorized error once the initial token expires.

cachestring
DefaultPT5M
Formatduration

Token cache duration

How long a fetched token is reused before the provider executes the task again. Caching avoids hammering the token endpoint on every Kubernetes API call. Defaults to 5 minutes (PT5M). Set to PT0S to disable caching.

outputstring

Token output expression

An expression to extract the token value from the task output, e.g. {{ accessToken.tokenValue }}.

task

Token provider task

A Kestra task that fetches a fresh OAuth token. This task is executed each time the Kubernetes client needs to authenticate, enabling automatic token refresh for long-running operations.

passwordstring

Password

trustCertsbooleanstring

Trust all certificates

When true, skips TLS cert validation. Use only for testing.

trustStoreFilestring

Truststore file

trustStorePassphrasestring

Truststore passphrase

usernamestring

Username

watchReconnectIntervalstring

Watch reconnect interval

Backoff between watch reconnect attempts. Increase to prevent reconnect storms under API server pressure. Fabric8 default: 1s.

websocketPingIntervalstring

WebSocket ping interval

Keepalive ping on exec/log connections so idle streams aren't dropped by a proxy (e.g. GKE konnectivity). Only honored by the OkHttp backend. 0 disables.

Defaulttrue

Inherit cluster auto-configuration

When true, explicit connection fields override the ambient kubeconfig or in-cluster configuration.

DefaultPT1M
Formatduration

Polling interval

Label selector

Kubernetes label selector applied to PipelineRuns.

Default100

PipelineRuns per page

Number of PipelineRuns fetched per Kubernetes page. Every page is read on each poll when a continuation token is returned. Defaults to 100; must be between 1 and 1000. Use a labelSelector to keep trigger polling focused.

Defaultdefault

Tekton namespace

Namespace where the PipelineRun is managed.

SubTypestring
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTED

List of execution states after which a trigger should be stopped (a.k.a. disabled).

Defaulttrue

A condition that determines whether the trigger should run.

A Pebble expression evaluated at trigger time. The trigger fires only when the expression evaluates to a truthy value (true, a non-empty string, a non-zero number). Use this to gate trigger execution on dynamic runtime values such as execution labels, flow variables, or environment conditions.

Formatdate-time

Run completion time

Run conditions

Definitions
lastTransitionTimestring

Last transition time

messagestring

Condition message

reasonstring

Condition reason

statusstring

Condition status

typestring

Condition type

Run name

Run namespace

SubTypestring

Run results

Formatdate-time

Run start time

Run status

True, False, or Unknown from the Tekton Succeeded condition.