<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Integration with controller-runtime on Component Operator Runtime</title><link>https://sap.github.io/component-operator-runtime/docs/concepts/controller-runtime/</link><description>Recent content in Integration with controller-runtime on Component Operator Runtime</description><generator>Hugo</generator><language>en-us</language><atom:link href="https://sap.github.io/component-operator-runtime/docs/concepts/controller-runtime/index.xml" rel="self" type="application/rss+xml"/><item><title>Components</title><link>https://sap.github.io/component-operator-runtime/docs/concepts/controller-runtime/components/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://sap.github.io/component-operator-runtime/docs/concepts/controller-runtime/components/</guid><description>&lt;p&gt;The &lt;code&gt;Component&lt;/code&gt; interface is the central abstraction of the higher-level programming
model. It abstracts any custom resource type that describes and models a &lt;em&gt;component&lt;/em&gt; in
the sense of the &lt;a href="../../../#terminology"&gt;terminology&lt;/a&gt;: a coherent set of dependent
objects that are to be applied to a cluster. A component operator built on top of
component-operator-runtime provides one such custom resource type per component, and
that type has to implement &lt;code&gt;Component&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id="the-component-interface"&gt;The &lt;code&gt;Component&lt;/code&gt; interface&lt;a class="td-heading-self-link" href="#the-component-interface" aria-label="Heading self-link"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-go" data-lang="go"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00f"&gt;package&lt;/span&gt; component
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#008000"&gt;// Component is the central interface that component operators have to implement.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#008000"&gt;// Besides being a controller-runtime client.Object, the implementing type has to expose&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#008000"&gt;// accessor methods for the component&amp;#39;s spec and status, GetSpec() and GetStatus().&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#00f"&gt;type&lt;/span&gt; Component &lt;span style="color:#00f"&gt;interface&lt;/span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;	client.Object
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;	&lt;span style="color:#008000"&gt;// Return a read-only accessor to the component&amp;#39;s spec.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;	&lt;span style="color:#008000"&gt;// The returned value has to implement the types.Unstructurable interface.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;	GetSpec() types.Unstructurable
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;	&lt;span style="color:#008000"&gt;// Return a read-write (usually a pointer) accessor to the component&amp;#39;s status,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;	&lt;span style="color:#008000"&gt;// resp. to the corresponding substruct if the status extends component.Status.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;	GetStatus() *Status
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Because the implementing type embeds controller-runtime&amp;rsquo;s &lt;code&gt;client.Object&lt;/code&gt;, it is a
regular Kubernetes API type (with &lt;code&gt;TypeMeta&lt;/code&gt; and &lt;code&gt;ObjectMeta&lt;/code&gt;). On top of that, only two
accessor methods have to be provided:&lt;/p&gt;</description></item><item><title>Reconciler</title><link>https://sap.github.io/component-operator-runtime/docs/concepts/controller-runtime/reconciler/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://sap.github.io/component-operator-runtime/docs/concepts/controller-runtime/reconciler/</guid><description>&lt;p&gt;&lt;code&gt;Reconciler[T]&lt;/code&gt; is the heart of the higher-level programming model. It implements
controller-runtime&amp;rsquo;s &lt;code&gt;reconcile.Reconciler&lt;/code&gt; interface, so it can be plugged into any
controller-runtime manager, and it drives a single &lt;a href="../components/"&gt;component&lt;/a&gt; type
&lt;code&gt;T&lt;/code&gt; end to end: it reads the component, resolves its references, renders the dependent
objects through a &lt;a href="../generators/"&gt;generator&lt;/a&gt;, and delegates the actual cluster
synchronization to the low-level &lt;a href="../../reconciler/overview/"&gt;object reconciler&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="a-parameterized-go-interface"&gt;A parameterized Go interface&lt;a class="td-heading-self-link" href="#a-parameterized-go-interface" aria-label="Heading self-link"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;The reconciler is a &lt;em&gt;generic&lt;/em&gt; type, parameterized by the component type it manages:&lt;/p&gt;</description></item></channel></rss>