> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/tektoncd/pipeline/llms.txt
> Use this file to discover all available pages before exploring further.

# Architecture Overview

> Understand how Tekton Pipelines is built and how it extends Kubernetes

Tekton Pipelines extends Kubernetes using Custom Resource Definitions (CRDs) and controllers. This guide helps you understand the architecture and key concepts.

## Learning Resources

We recommend checking out the [Teknical Tekton](https://www.youtube.com/channel/UCUEuKDqyRnGFCE7FpainSpQ) channel for training and tutorials on Tekton.

## How Tekton Works

Tekton implements several Kubernetes resource controllers configured by Tekton CRDs. Understanding how this works is essential for contributing to the project.

### Key Concepts

<CardGroup cols={2}>
  <Card title="Controller Logic" icon="gear" href="https://github.com/tektoncd/pipeline/blob/main/docs/developers/controller-logic.md">
    Learn how Tekton extends Kubernetes using Knative
  </Card>

  <Card title="TaskRun Logic" icon="play" href="https://github.com/tektoncd/pipeline/blob/main/docs/developers/taskruns.md">
    Understand how TaskRuns are executed in pods
  </Card>

  <Card title="Resources Labeling" icon="tag" href="https://github.com/tektoncd/pipeline/blob/main/docs/developers/resources-labelling.md">
    Learn about labels applied to Tekton resources
  </Card>

  <Card title="Multi-Tenant Support" icon="users" href="https://github.com/tektoncd/pipeline/blob/main/docs/developers/multi-tenant-support.md">
    Running Tekton in multi-tenant configurations
  </Card>
</CardGroup>

## Code Structure

When making changes to Tekton, you'll primarily interact with:

### CRD Type Definitions

* Located in `pkg/apis/pipeline/v1beta1`
* Define the structure of Tekton resources (Tasks, Pipelines, etc.)
* Example: `task_types.go`, `pipeline_types.go`

### Reconcilers

* Located in `pkg/reconciler`
* Implement the controller logic for each CRD type
* Example: `taskrun/`, `pipelinerun/`

### Generated Clients

* Located in `pkg/client`
* Generated by `./hack/update-codegen.sh`
* Used to interact with Tekton resources in Kubernetes

## API Versioning

Tekton supports multiple API versions and feature gates. Learn more about:

* [API Versioning](https://github.com/tektoncd/pipeline/blob/main/docs/developers/api-versioning.md) - How Tekton supports multiple API versions
* [API Compatibility Policy](https://github.com/tektoncd/pipeline/blob/main/api_compatibility_policy.md) - Guidelines for making API changes

## Feature Implementation Details

Learn how specific features are implemented:

<AccordionGroup>
  <Accordion title="Results Lifecycle">
    Understand how task and pipeline results are created, stored, and retrieved.

    See [Results Lifecycle](https://github.com/tektoncd/pipeline/blob/main/docs/developers/results-lifecycle.md) for details.
  </Accordion>

  <Accordion title="Affinity Assistant">
    Learn how the Affinity Assistant helps with workspace sharing between tasks.

    See [Affinity Assistant](https://github.com/tektoncd/pipeline/blob/main/docs/developers/affinity-assistant.md) for details.
  </Accordion>
</AccordionGroup>

## Development Scripts

The `hack/` directory contains scripts for development tasks:

* `./hack/update-deps.sh` - Update external dependencies
* `./hack/update-codegen.sh` - Update type definitions and generated clients
* `./hack/update-openapigen.sh` - Update OpenAPI specifications

## Testing

For comprehensive information on testing, including test categories and how to run different test suites, see the [Testing Guide](https://github.com/tektoncd/pipeline/blob/main/test/README.md).

## Next Steps

<CardGroup cols={2}>
  <Card title="Development Guide" icon="code" href="/contributing/development-guide">
    Set up your development environment
  </Card>

  <Card title="Contributing Overview" icon="hand-wave" href="/contributing/overview">
    Learn how to contribute
  </Card>

  <Card title="Local Setup" icon="laptop" href="https://github.com/tektoncd/pipeline/blob/main/docs/developers/local-setup.md">
    Detailed local development setup
  </Card>

  <Card title="Tracing" icon="magnifying-glass" href="https://github.com/tektoncd/pipeline/blob/main/docs/developers/tracing.md">
    Enable Jaeger tracing for debugging
  </Card>
</CardGroup>
