tekton-pipeline-queue
by sergk
A Helm chart for the Tekton Pipeline Queue operator
About this chart
tekton-pipeline-queue
A Helm chart for the Tekton Pipeline Queue operator
Homepage: https://docs.kuberocketci.io/
Introduction
Tekton Pipeline Queue governs concurrency and admission ordering of Tekton PipelineRun resources.
It defines the PipelineRunQueue CRD, which selects a set of PipelineRuns (via a label selector),
groups them into lanes (via label-derived queue keys) and admits at most concurrency runs per lane
according to a configurable strategy, keeping the rest queued until a slot becomes free.
Project Structure
- api/v1alpha1/: Contains the API definitions for the
PipelineRunQueuecustom resource, including the structure and validation of the CRD. - cmd/: Hosts the main application entry point and the command-line interface setup.
- config/: Includes Kubernetes configuration files for deploying the controller, such as CRDs, RBAC rules, and sample configurations.
- docs/: Provides detailed documentation on the API and usage examples.
- deploy-templates/: Contains Helm chart templates for deploying the controller.
Getting Started
To get started with Tekton Pipeline Queue, ensure you have Kubernetes and Tekton Pipelines installed in your environment. Follow these steps to deploy the controller:
-
Clone the repository to your local environment.
-
Navigate to the
config/directory. -
Apply the CRDs to your Kubernetes cluster:
kubectl apply -f config/crd/bases/
Deploy with Helm
-
To add the Helm EPAMEDP Charts for local client, run "helm repo add":
helm repo add epamedp https://epam.github.io/edp-helm-charts/stable -
Choose available Helm chart version:
helm search repo epamedp/tekton-pipeline-queue -l NAME CHART VERSION APP VERSION DESCRIPTION epamedp/tekton-pipeline-queue 0.1.0 0.1.0 A Helm chart for the Tekton Pipeline Queue operatorNOTE: It is highly recommended to use the latest released version.
-
Full chart parameters available in deploy-templates/README.md.
-
Install operator with the following command:
helm install tekton-pipeline-queue epamedp/tekton-pipeline-queue --version <chart_version> -
Check the namespace that should contain the Tekton Pipeline Queue controller in a running status.
Deploy with cluster add-ons
-
Navigate to the forked edp-cluster-add-ons repository.
-
Enable the deployment of the Tekton Pipeline Queue Helm chart by setting the
tekton-pipeline-queue.enableandtekton-pipeline-queue.createNamespacevalues totruein theclusters/core/apps/values.yamlfile.tekton-pipeline-queue: createNamespace: true enable: true -
Update the
clusters/core/addons/tekton-pipeline-queue/values.yamlfile with the desired configuration for the Tekton Pipeline Queue Helm chart. -
After updating the
values.yamlfile, commit the changes to the repository and apply the changes with Helm or Argo CD.
Usage
Create a PipelineRunQueue that selects the PipelineRuns to govern and defines how they are grouped
into lanes:
apiVersion: edp.epam.com/v1alpha1
kind: PipelineRunQueue
metadata:
name: deploy-queue
spec:
selector:
matchLabels:
app.edp.epam.com/pipelinetype: deploy
queueKey:
- app.edp.epam.com/cdpipeline
- app.edp.epam.com/cdstage
concurrency: 1
strategy: Queue
Apply the definition to your Kubernetes cluster:
kubectl apply -f pipelinerunqueue.yaml
Features
- Lane-based Concurrency Control: Group
PipelineRuns into independent lanes via label-derived queue keys and cap the number of concurrently running runs per lane. - Configurable Admission Strategy: Choose whether newer runs queue behind, replace queued, or cancel in-progress runs in the same lane.
- Flexible Selection: Use a standard Kubernetes label selector to choose which
PipelineRuns a queue governs.
Contributing
We welcome contributions in the form of issues and pull requests. Please follow the contributing guidelines outlined in the repository.
License
This project is licensed under the Apache License 2.0.
Maintainers
| Name | Url | |
|---|---|---|
| epmd-edp | [email protected] | https://solutionshub.epam.com/solution/kuberocketci |
Source Code
Values
| Key | Type | Default | Description |
|---|---|---|---|
| affinity | object | {} | Affinity for pod assignment |
| annotations | object | {} | Annotations to add to the deployment |
| extraVolumeMounts | list | [] | Additional volume mounts to add to the manager container |
| extraVolumes | list | [] | Additional volumes to add to the manager pod |
| image.registry | string | "" | tekton-pipeline-queue image registry. Leave empty to use the repository as-is (Docker Hub by default) |
| image.repository | string | "epamedp/tekton-pipeline-queue" | tekton-pipeline-queue Docker image name. The released image can be found on Dockerhub |
| image.tag | string | nil | tekton-pipeline-queue Docker image tag. The released image can be found on Dockerhub. If not defined then .Chart.AppVersion is used |
| imagePullPolicy | string | "IfNotPresent" | Image pull policy |
| imagePullSecrets | list | [] | Optional array of imagePullSecrets containing private registry credentials # Ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry |
| name | string | "tekton-pipeline-queue" | component name |
| nodeSelector | object | {} | Node labels for pod assignment |
| podSecurityContext | object | {"runAsNonRoot":true,"seccompProfile":{"type":"RuntimeDefault"}} | Pod-level security context # Ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ |
| resources | object | {"limits":{"memory":"192Mi"},"requests":{"cpu":"50m","memory":"64Mi"}} | Resource requests/limits for the manager container. # Ref: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ |
| securityContext | object | {"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"readOnlyRootFilesystem":true} | Container-level security context # Ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ |
| tolerations | list | [] | Tolerations for pod assignment |
Deploy tekton-pipeline-queue with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has tekton-pipeline-queue on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the charttekton-pipeline-queue is pinned at v0.1.0-SNAPSHOT.14 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply