Skip to content

Latest commit

 

History

History
 
 

concurrency

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

This project aims to address TEP-0120: Canceling Concurrent PipelineRuns. It is an experimental project that may change in breaking ways at any time.

Installation

Install from nightly release

kubectl apply --filename https://storage.googleapis.com/tekton-releases-nightly/concurrency/latest/release.yaml

Build and install from source

ko apply -f config

Usage

To try it out:

kubectl apply -f examples/concurrencycontrol.yaml
kubectl create -f examples/pipelinerun.yaml

This first PipelineRun should begin executing normally. Now, create another PipelineRun that also matches the concurrency control:

kubectl create -f examples/pipelinerun.yaml

The first PipelineRun should be canceled, and the second one should execute normally.

Supported concurrency strategies

Supported strategies are "Cancel", "GracefullyCancel", and "GracefullyStop" (corresponding to canceling, gracefully canceling, and gracefully stopping a PipelineRun, respectively). The default strategy is "GracefullyCancel". If multiple ConcurrencyControls with different strategies apply to the same PipelineRun, concurrency controls will fail.

Configuration

To restrict the concurrency webhook and controller to only modify PipelineRuns in a subset of namespaces, edit the "allowed-namespaces" field of the concurrency configMap to be a comma-separated list of these namespaces, for example: allowed-namespaces: "default,another-namespace".