concurrency

module
v0.0.0-...-8ee384e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 19, 2024 License: Apache-2.0

README

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".

Directories

Path Synopsis
cmd
pkg
apis/concurrency/v1alpha1
Package v1alpha1 contains API Schema definitions for the concurrency v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:defaulter-gen=TypeMeta +groupName=custom.tekton.dev
Package v1alpha1 contains API Schema definitions for the concurrency v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:defaulter-gen=TypeMeta +groupName=custom.tekton.dev
client/clientset/versioned
This package has the automatically generated clientset.
This package has the automatically generated clientset.
client/clientset/versioned/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
client/clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
client/clientset/versioned/typed/concurrency/v1alpha1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
client/clientset/versioned/typed/concurrency/v1alpha1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
third_party
github.com/hashicorp/errwrap
Package errwrap implements methods to formalize error wrapping in Go.
Package errwrap implements methods to formalize error wrapping in Go.
github.com/hashicorp/golang-lru
Package lru provides three different LRU caches of varying sophistication.
Package lru provides three different LRU caches of varying sophistication.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL