Skip to main content
CustomRun is at v1beta1 stability level.
A CustomRun represents a single execution of a Custom Task. Custom Tasks extend Tekton’s capabilities beyond the built-in Task type.

Resource Definition

apiVersion
string
required
tekton.dev/v1beta1
kind
string
required
CustomRun
metadata
ObjectMeta
required
Standard Kubernetes metadata.
spec
CustomRunSpec
required
Defines the desired state of the CustomRun.
status
CustomRunStatus
Defines the observed state of the CustomRun.

CustomRunSpec

customRef
TaskRef
Reference to the Custom Task definition. Mutually exclusive with customSpec.
customSpec
EmbeddedCustomRunSpec
Inline Custom Task specification. Mutually exclusive with customRef.
params
[]Param
Parameters to pass to the Custom Task.See Parameter Types for details.
serviceAccountName
string
ServiceAccount to use for running the CustomRun.
workspaces
[]WorkspaceBinding
Workspace bindings for the CustomRun.See Workspace Types for details.
timeout
Duration
Time after which the CustomRun times out.Format: Go duration string (e.g., “1h30m”)
retries
integer
default:0
Number of times to retry on failure.
status
string
Used for cancelling a CustomRun.Values:
  • RunCancelled - Cancel the CustomRun
statusMessage
string
Human-readable status message for cancellation.

CustomRunStatus

conditions
[]Condition
Conditions describing the current state of the CustomRun.
startTime
Time
When the CustomRun started executing.
completionTime
Time
When the CustomRun completed.
results
[]CustomRunResult
Results produced by the CustomRun.
retriesStatus
[]CustomRunStatus
Status of previous retry attempts.

Custom Task Controllers

CustomRun is designed to be reconciled by custom task controllers. The controller is responsible for:
  1. Watching for CustomRuns that match its task type
  2. Executing the custom logic
  3. Updating the CustomRun status with results and conditions

Example

apiVersion: tekton.dev/v1beta1
kind: CustomRun
metadata:
  name: example-customrun
spec:
  customRef:
    apiVersion: example.dev/v1
    kind: Example
    name: my-example-task
  params:
    - name: target
      value: production
  timeout: 30m

Build docs developers (and LLMs) love