<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>PackageRevision Controller on Porch Documentation</title><link>/docs/5_architecture_and_components/controllers/packagerevision-controller/</link><description>Recent content in PackageRevision Controller on Porch Documentation</description><generator>Hugo</generator><language>en-us</language><atom:link href="/docs/5_architecture_and_components/controllers/packagerevision-controller/index.xml" rel="self" type="application/rss+xml"/><item><title>Design</title><link>/docs/5_architecture_and_components/controllers/packagerevision-controller/design/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/5_architecture_and_components/controllers/packagerevision-controller/design/</guid><description>&lt;h2 id="controller-structure"&gt;Controller Structure&lt;a class="td-heading-self-link" href="#controller-structure" aria-label="Heading self-link"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The PR Controller is a standard 
&lt;a href="https://github.com/kubernetes-sigs/controller-runtime" target="_blank"&gt;controller-runtime&lt;/a&gt; reconciler. Its internal structure mirrors the reconciliation pipeline, with each concern handled by a dedicated sub-reconciler that returns early if its work is not needed:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;PackageRevisionReconciler
├── reconcileFinalizer() — Finalizer + ownerReference management, deletion gating
├── reconcileSource() — One-time package creation (init/clone/copy/upgrade)
├── reconcileRender() — KRM function pipeline execution
└── reconcileLifecycle() — Git lifecycle transitions, revision numbering
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;For detailed behaviour of each phase, see the 
&lt;a href="/docs/5_architecture_and_components/controllers/packagerevision-controller/functionality/"&gt;Functionality&lt;/a&gt; section.&lt;/p&gt;</description></item><item><title>Interactions</title><link>/docs/5_architecture_and_components/controllers/packagerevision-controller/interactions/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/5_architecture_and_components/controllers/packagerevision-controller/interactions/</guid><description>&lt;h2 id="component-interaction-overview"&gt;Component Interaction Overview&lt;a class="td-heading-self-link" href="#component-interaction-overview" aria-label="Heading self-link"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt; ┌─────────────────────────────────────────────────────────┐
 │ User / GitOps │
 └───────────┬─────────────────────────────┬───────────────┘
 │ kubectl apply │ kubectl get PRR
 ▼ ▼
┌───────────────────────────────────────────┐ ┌─────────────────────────────┐
│ PackageRevision CRD (etcd) │ │ Porch API Server │
│ │ │ │
│ • spec.source (init/clone/copy/upgrade) │ │ • PackageRevisionResources │
│ • spec.lifecycle (Draft/Published/...) │ │ • Engine (content access) │
│ • annotations (render-request) │ │ │
└───────────────────┬───────────────────────┘ └──────────────┬──────────────┘
 │ watch │ read/write
 ▼ ▼
┌───────────────────────────────────────────────────────────────────────────────┐
│ Shared Cache (ContentCache) │
│ │
│ GetPackageContent · CreateNewDraft · CreateDraftFromExisting │
│ CloseDraft · UpdateLifecycle · DeletePackage │
│ │
└───────────────────────────────────────────────────────────────────────────────┘
 ▲ populated by │ git operations
 │ ▼
┌───────────────────────────┐ ┌───────────────────────────┐
│ Repository Controller │ │ Git Repository │
└───────────────────────────┘ └───────────────────────────┘
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id="repository-controller"&gt;Repository Controller&lt;a class="td-heading-self-link" href="#repository-controller" aria-label="Heading self-link"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The PR Controller and Repository Controller never communicate directly. Their coupling is entirely through the shared cache: the Repository Controller creates it, populates it by syncing Git repositories on schedule, and the PR Controller reads from and writes to it.&lt;/p&gt;</description></item></channel></rss>