A lightweight controller that manages concurrent execution of Tekton PipelineRuns on OpenShift, ensuring that pipeline runs sharing the same builder or tester machines do not execute simultaneously.
- PipelineRuns are submitted in a pending state (
spec.status: PipelineRunPending). - The controller polls the cluster on a configurable interval (default 30s) using the
ocCLI. - On each reconcile cycle it identifies busy machines by reading the
builderandtesterlabels from currently running PipelineRuns. - Pending PipelineRuns whose required machines are all free are started by patching away the
spec.statusfield. - PipelineRuns with no machine labels are started immediately.
This prevents two pipelines from using the same physical/virtual machine at the same time.
| Environment variable | Default | Description |
|---|---|---|
POLL_INTERVAL |
30 |
Seconds between reconcile cycles |
NAMESPACE |
(current namespace) | OpenShift namespace to watch |
PORT |
8080 |
HTTP port for health/status endpoints |
| Endpoint | Description |
|---|---|
GET /healthz |
Returns {"status": "ok"} — for liveness/readiness probes |
GET /status |
Returns current controller state (busy machines, pending/running PipelineRuns, last reconcile timestamp) |
Requires Podman.
# Build the container image
make build
# Build and push to quay.io
make pushThe container expects an authenticated oc session to be available at runtime.
- OpenShift cluster with Tekton installed
- PipelineRuns must use the
builderand/ortesterlabels to declare which machines they need - PipelineRuns must be created with
spec.status: PipelineRunPendingto be managed by the controller