Events in Tekton
Tekton’s task controller emits Kubernetes events
when TaskRuns and PipelineRuns execute. This allows you to monitor and react to what’s happening during execution by
retrieving those events using the kubectl describe command. Tekton can also emit CloudEvents.
Note: Conditions do not yet emit events.
Events in TaskRuns
TaskRuns emit events for the following Reasons:
Started: emitted the first time theTaskRunis picked by the reconciler from its work queue, so it only happens if webhook validation was successful. This event in itself does not indicate that aStepis executing; theStepexecutes once the following conditions are satisfied:- Validation of the
Taskand its associated resources must succeed, and - Checks for associated
Conditionsmust succeed, and - Scheduling of the associated
Podmust succeed.
- Validation of the
Succeeded: emitted once all steps in theTaskRunhave executed successfully, including post-steps injected by Tekton.Failed: emitted if theTaskRunfinishes running unsuccessfully because aStepfailed, or theTaskRuntimed out or was cancelled. ATaskRunalso emitsFailedevents if it cannot execute at all due to failing validation.
Events in PipelineRuns
PipelineRuns emit events for the following Reasons:
Started: emitted the first time thePipelineRunis picked by the reconciler from its work queue, so it only happens if webhook validation was successful. This event in itself does not indicate that aStepis executing; theStepexecutes once validation for thePipelineas well as all associatedTasksandResourcesis successful.Running: emitted when thePipelineRunpasses validation and actually begins execution.Succeeded: emitted once allTasksreachable via the DAG have executed successfully.Failed: emitted if thePipelineRunfinishes running unsuccessfully because aTaskfailed or thePipelineRuntimed out or was cancelled. APipelineRunalso emitsFailedevents if it cannot execute at all due to failing validation.
Events via CloudEvents
When you configure a sink, Tekton emits events as described in the table below.
Tekton sends cloud events in a parallel routine to allow for retries without blocking the
reconciler. A routine is started every time the Succeeded condition changes - either state,
reason or message. Retries are sent using an exponential back-off strategy.
Because of retries, events are not guaranteed to be sent to the target sink in the order they happened.
| Resource | Event | Event Type |
|---|---|---|
TaskRun |
Started |
dev.tekton.event.taskrun.started.v1 |
TaskRun |
Running |
dev.tekton.event.taskrun.running.v1 |
TaskRun |
Condition Change while Running |
dev.tekton.event.taskrun.unknown.v1 |
TaskRun |
Succeed |
dev.tekton.event.taskrun.successful.v1 |
TaskRun |
Failed |
dev.tekton.event.taskrun.failed.v1 |
PipelineRun |
Started |
dev.tekton.event.pipelinerun.started.v1 |
PipelineRun |
Running |
dev.tekton.event.pipelinerun.running.v1 |
PipelineRun |
Condition Change while Running |
dev.tekton.event.pipelinerun.unknown.v1 |
PipelineRun |
Succeed |
dev.tekton.event.pipelinerun.successful.v1 |
PipelineRun |
Failed |
dev.tekton.event.pipelinerun.failed.v1 |
Feedback
Was this page helpful?
Thanks! Tell us how we can further improve.
Sorry about that. Tell us how we can further improve.