Porch Controllers
Kubernetes controllers that automate Porch operations.
This section provides detailed documentation of Porch’s internal architecture, explaining how its components work together to manage KRM configuration packages.
Porch has a modular architecture. Components are shared across two orchestration paths: the original aggregated API model and the newer CRD-based controller model. The CRD-based model is the active development focus.
Kubernetes controllers that manage package lifecycle and automate operations:
porch.kpt.dev/v1alpha2) — creation, rendering, lifecycle transitions. The primary orchestration path for new deployments.The Kubernetes aggregated API server that serves porch.kpt.dev/v1alpha1:
The Configuration as Data (CaD) Engine:
The shared caching layer between controllers/Engine and Git repositories:
A standalone gRPC service for executing KRM functions:
Porch supports two orchestration paths. Both use the same shared cache, function runner, and Git storage format.
The recommended path for new deployments. PackageRevision is a native CRD in etcd, reconciled asynchronously by the PR Controller. This path requires the porch.kpt.dev/v1alpha2-migration: "true" annotation on the Repository CRD.
User (kubectl)
│
▼
PackageRevision CRD (etcd) PackageRevisionResources (PRR)
│ │
│ watch │ aggregated API
▼ ▼
PR Controller ──────────────────────► Porch API Server / Engine
│ │
│ read/write │ read/write
▼ ▼
┌──────────────────────────────────────────────────────────┐
│ Shared Cache │
│ (populated by Repo Controller) │
└──────────────────────────────────────────────────────────┘
│ ▲
│ git ops │ sync
▼ │
┌─────────┐ ┌───────────────────┐
│ Git │◄─────────│ Repository Ctr │
└─────────┘ └───────────────────┘
porch.kpt.dev/v1alpha2-migration: "true" to enable CRD creationThe original architecture. PackageRevision is served by the API Server with custom REST storage. Operations are synchronous within the request path.
User (kubectl / porchctl)
│
▼
Porch API Server (aggregated API)
│
▼
Engine (orchestration)
│
▼
Shared Cache ──────► Git
Both paths coexist in the same cluster and share the same Git repositories
Separation of Concerns: Each component has a well-defined responsibility. The cache owns Git interaction. The function runner owns function execution. Controllers own reconciliation logic.
Shared Infrastructure: Both orchestration paths share the cache, function runner, Git storage format, and lifecycle semantics. A package created via either path looks the same in Git.
Extensibility: Cache implementations (CR, DB) are interchangeable. Function evaluators support multiple execution strategies. Repository adapters abstract storage backends.
Kubernetes controllers that automate Porch operations.
The Kubernetes extension API server that provides Porch’s API resources.
The CaD Engine that orchestrates package lifecycle operations.
Caching layer for repository and package data.
Separate gRPC service for executing KRM functions in isolated environments.