# tektoncd/pipeline architecture

> Architecture diagram of the GitHub repository tektoncd/pipeline, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/tektoncd/pipeline
- Repository: https://github.com/tektoncd/pipeline

## Overview

Tekton Pipelines is a Kubernetes-native system for declaring and running container-based CI/CD pipelines. Users define Pipeline and Task resources, submit a PipelineRun, and the controller resolves its tasks and reconciles TaskRuns; Kubernetes runs the resulting containers. The repository also provides admission and API-version conversion, remote resource resolvers, event notifications, and workload identity support. Edges reflect the README and source-index references shown here; some feature relationships are documented or strongly implied but not confirmed by sampled call sites, and are marked dashed.

Main entry points: [`pkg/reconciler/pipelinerun/pipelinerun.go`](https://github.com/tektoncd/pipeline/blob/main/pkg/reconciler/pipelinerun/pipelinerun.go) (PipelineRun reconciler), [`pkg/reconciler/taskrun/controller.go`](https://github.com/tektoncd/pipeline/blob/main/pkg/reconciler/taskrun/controller.go) (TaskRun reconciler), [`cmd/resolvers/main.go`](https://github.com/tektoncd/pipeline/blob/main/cmd/resolvers/main.go) (Resolver startup), [`pkg/apis/pipeline/v1/pipeline_validation.go`](https://github.com/tektoncd/pipeline/blob/main/pkg/apis/pipeline/v1/pipeline_validation.go) (Pipeline resources)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["Pipeline APIs"]
  node_pipeline_api["Pipeline resources"]
  node_run_api["PipelineRun resources"]
  node_beta_api["v1beta1 API"]
  node_beta_conversion["API conversion"]
  node_webhook["Admission webhook<br/>[main.go]"]
end

subgraph group_control["Run Control"]
  node_controller_main["Controller startup<br/>[main.go]"]
  node_pr_controller["PipelineRun reconciler<br/>[pipelinerun.go]"]
  node_run_state["Run state"]
  node_run_resolution["Task resolution"]
  node_taskrun_controller["TaskRun reconciler<br/>[controller.go]"]
end

subgraph group_resolve["Resource Resolution"]
  node_resolver_main["Resolver startup<br/>[main.go]"]
  node_remote_framework["Remote resolver framework<br/>[controller.go]"]
  node_local_framework["Resolution framework<br/>[controller.go]"]
  node_git_resolver["Git resolver<br/>[repository.go]"]
end

subgraph group_runtime["Task Runtime"]
  node_entrypoint["Step entrypoint<br/>[main.go]"]
end

subgraph group_integrations["Platform Integrations"]
  node_cloud_events["Cloud events"]
  node_spire["SPIRE identity<br/>[controller.go]"]
end

node_user(("Pipeline author"))
node_kube(("Kubernetes"))

node_user -->|"declares"| node_pipeline_api
node_user -.->|"submits"| node_run_api
node_pipeline_api -.->|"defines inputs"| node_run_api
node_webhook -.->|"admits resources"| node_pipeline_api
node_webhook -->|"converts versions"| node_beta_api
node_beta_conversion -->|"converts to"| node_run_api
node_controller_main -->|"starts"| node_pr_controller
node_pr_controller -->|"resolves tasks"| node_run_resolution
node_pr_controller -->|"reads run state"| node_run_state
node_pr_controller -.->|"creates TaskRuns"| node_taskrun_controller
node_pr_controller -->|"reconciles resources"| node_kube
node_taskrun_controller -->|"reconciles TaskRuns"| node_kube
node_kube -->|"runs containers"| node_entrypoint
node_resolver_main -->|"registers resolvers"| node_remote_framework
node_resolver_main -->|"configures Git"| node_git_resolver
node_remote_framework -->|"watches requests"| node_kube
node_local_framework -->|"watches requests"| node_kube
node_run_resolution -.->|"requests resolution"| node_resolver_main
node_cloud_events -.->|"publishes events"| node_kube
node_taskrun_controller -->|"uses identity"| node_spire

click node_pipeline_api "https://github.com/tektoncd/pipeline/blob/main/pkg/apis/pipeline/v1/pipeline_validation.go"
click node_run_api "https://github.com/tektoncd/pipeline/blob/main/pkg/apis/pipeline/v1/pipelinerun_validation.go"
click node_beta_api "https://github.com/tektoncd/pipeline/blob/main/pkg/apis/pipeline/v1beta1/pipeline_validation.go"
click node_beta_conversion "https://github.com/tektoncd/pipeline/blob/main/pkg/apis/pipeline/v1beta1/pipelinerun_conversion.go"
click node_webhook "https://github.com/tektoncd/pipeline/blob/main/cmd/webhook/main.go"
click node_controller_main "https://github.com/tektoncd/pipeline/blob/main/cmd/controller/main.go"
click node_pr_controller "https://github.com/tektoncd/pipeline/blob/main/pkg/reconciler/pipelinerun/pipelinerun.go"
click node_run_state "https://github.com/tektoncd/pipeline/blob/main/pkg/reconciler/pipelinerun/resources/pipelinerunstate.go"
click node_run_resolution "https://github.com/tektoncd/pipeline/blob/main/pkg/reconciler/pipelinerun/resources/pipelinerunresolution.go"
click node_taskrun_controller "https://github.com/tektoncd/pipeline/blob/main/pkg/reconciler/taskrun/controller.go"
click node_resolver_main "https://github.com/tektoncd/pipeline/blob/main/cmd/resolvers/main.go"
click node_remote_framework "https://github.com/tektoncd/pipeline/blob/main/pkg/remoteresolution/resolver/framework/controller.go"
click node_local_framework "https://github.com/tektoncd/pipeline/blob/main/pkg/resolution/resolver/framework/controller.go"
click node_git_resolver "https://github.com/tektoncd/pipeline/blob/main/pkg/resolution/resolver/git/repository.go"
click node_entrypoint "https://github.com/tektoncd/pipeline/blob/main/cmd/entrypoint/main.go"
click node_cloud_events "https://github.com/tektoncd/pipeline/blob/main/pkg/reconciler/events/cloudevent/cloud_event_controller.go"
click node_spire "https://github.com/tektoncd/pipeline/blob/main/pkg/spire/controller.go"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_pipeline_api,node_run_api,node_beta_api,node_beta_conversion,node_webhook toneBlue
class node_controller_main,node_pr_controller,node_run_state,node_run_resolution,node_taskrun_controller toneAmber
class node_resolver_main,node_remote_framework,node_local_framework,node_git_resolver toneMint
class node_entrypoint toneRose
class node_cloud_events,node_spire,node_user,node_kube toneIndigo
```

## Components

### Pipeline APIs

- [Pipeline resources](https://github.com/tektoncd/pipeline/blob/main/pkg/apis/pipeline/v1/pipeline_validation.go): `pkg/apis/pipeline/v1/pipeline_validation.go`
- [PipelineRun resources](https://github.com/tektoncd/pipeline/blob/main/pkg/apis/pipeline/v1/pipelinerun_validation.go): `pkg/apis/pipeline/v1/pipelinerun_validation.go`
- [v1beta1 API](https://github.com/tektoncd/pipeline/blob/main/pkg/apis/pipeline/v1beta1/pipeline_validation.go): `pkg/apis/pipeline/v1beta1/pipeline_validation.go`
- [API conversion](https://github.com/tektoncd/pipeline/blob/main/pkg/apis/pipeline/v1beta1/pipelinerun_conversion.go): `pkg/apis/pipeline/v1beta1/pipelinerun_conversion.go`
- [Admission webhook](https://github.com/tektoncd/pipeline/blob/main/cmd/webhook/main.go): `cmd/webhook/main.go`

### Run Control

- [Controller startup](https://github.com/tektoncd/pipeline/blob/main/cmd/controller/main.go): `cmd/controller/main.go`
- [PipelineRun reconciler](https://github.com/tektoncd/pipeline/blob/main/pkg/reconciler/pipelinerun/pipelinerun.go): `pkg/reconciler/pipelinerun/pipelinerun.go`
- [Run state](https://github.com/tektoncd/pipeline/blob/main/pkg/reconciler/pipelinerun/resources/pipelinerunstate.go): `pkg/reconciler/pipelinerun/resources/pipelinerunstate.go`
- [Task resolution](https://github.com/tektoncd/pipeline/blob/main/pkg/reconciler/pipelinerun/resources/pipelinerunresolution.go): `pkg/reconciler/pipelinerun/resources/pipelinerunresolution.go`
- [TaskRun reconciler](https://github.com/tektoncd/pipeline/blob/main/pkg/reconciler/taskrun/controller.go): `pkg/reconciler/taskrun/controller.go`

### Resource Resolution

- [Resolver startup](https://github.com/tektoncd/pipeline/blob/main/cmd/resolvers/main.go): `cmd/resolvers/main.go`
- [Remote resolver framework](https://github.com/tektoncd/pipeline/blob/main/pkg/remoteresolution/resolver/framework/controller.go): `pkg/remoteresolution/resolver/framework/controller.go`
- [Resolution framework](https://github.com/tektoncd/pipeline/blob/main/pkg/resolution/resolver/framework/controller.go): `pkg/resolution/resolver/framework/controller.go`
- [Git resolver](https://github.com/tektoncd/pipeline/blob/main/pkg/resolution/resolver/git/repository.go): `pkg/resolution/resolver/git/repository.go`

### Task Runtime

- [Step entrypoint](https://github.com/tektoncd/pipeline/blob/main/cmd/entrypoint/main.go): `cmd/entrypoint/main.go`

### Platform Integrations

- [Cloud events](https://github.com/tektoncd/pipeline/blob/main/pkg/reconciler/events/cloudevent/cloud_event_controller.go): `pkg/reconciler/events/cloudevent/cloud_event_controller.go`
- [SPIRE identity](https://github.com/tektoncd/pipeline/blob/main/pkg/spire/controller.go): `pkg/spire/controller.go`

### Other components

- **Pipeline author**
- **Kubernetes**

## Connections

- Pipeline author → Pipeline resources: declares (evidence: `README.md`)
- Pipeline author → PipelineRun resources: submits
- Pipeline resources → PipelineRun resources: defines inputs
- Admission webhook → Pipeline resources: admits resources (evidence: `cmd/webhook/main.go`)
- Admission webhook → v1beta1 API: converts versions (evidence: `cmd/webhook/main.go`)
- API conversion → PipelineRun resources: converts to (evidence: `pkg/apis/pipeline/v1beta1/pipelinerun_conversion.go`)
- Controller startup → PipelineRun reconciler: starts (evidence: `cmd/controller/main.go`)
- PipelineRun reconciler → Task resolution: resolves tasks (evidence: `pkg/reconciler/pipelinerun/pipelinerun.go`)
- PipelineRun reconciler → Run state: reads run state (evidence: `pkg/reconciler/pipelinerun/pipelinerun.go`)
- PipelineRun reconciler → TaskRun reconciler: creates TaskRuns
- PipelineRun reconciler → Kubernetes: reconciles resources (evidence: `pkg/reconciler/pipelinerun/pipelinerun.go`)
- TaskRun reconciler → Kubernetes: reconciles TaskRuns (evidence: `pkg/reconciler/taskrun/controller.go`)
- Kubernetes → Step entrypoint: runs containers (evidence: `README.md`)
- Resolver startup → Remote resolver framework: registers resolvers (evidence: `cmd/resolvers/main.go`)
- Resolver startup → Git resolver: configures Git (evidence: `cmd/resolvers/main.go`)
- Remote resolver framework → Kubernetes: watches requests (evidence: `pkg/remoteresolution/resolver/framework/controller.go`)
- Resolution framework → Kubernetes: watches requests (evidence: `pkg/resolution/resolver/framework/controller.go`)
- Task resolution → Resolver startup: requests resolution
- Cloud events → Kubernetes: publishes events
- TaskRun reconciler → SPIRE identity: uses identity
