<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Documentation on Java Operator SDK</title><link>https://aerben.github.io/josdk-docs-test/v5.3/docs/documentation/</link><description>Recent content in Documentation on Java Operator SDK</description><generator>Hugo</generator><language>en</language><atom:link href="https://aerben.github.io/josdk-docs-test/v5.3/docs/documentation/index.xml" rel="self" type="application/rss+xml"/><item><title>Implementing a reconciler</title><link>https://aerben.github.io/josdk-docs-test/v5.3/docs/documentation/reconciler/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://aerben.github.io/josdk-docs-test/v5.3/docs/documentation/reconciler/</guid><description>&lt;h2 id="how-reconciliation-works"&gt;How Reconciliation Works&lt;/h2&gt;
&lt;p&gt;The reconciliation process is event-driven and follows this flow:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Event Reception&lt;/strong&gt;: Events trigger reconciliation from:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Primary resources&lt;/strong&gt; (usually custom resources) when created, updated, or deleted&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Secondary resources&lt;/strong&gt; through registered event sources&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Reconciliation Execution&lt;/strong&gt;: Each reconciler handles a specific resource type and listens for events from the Kubernetes API server. When an event arrives, it triggers reconciliation unless one is already running for that resource. The framework ensures no concurrent reconciliation occurs for the same resource.&lt;/p&gt;</description></item><item><title>Error handling and retries</title><link>https://aerben.github.io/josdk-docs-test/v5.3/docs/documentation/error-handling-retries/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://aerben.github.io/josdk-docs-test/v5.3/docs/documentation/error-handling-retries/</guid><description>&lt;h2 id="how-automatic-retries-work"&gt;How Automatic Retries Work&lt;/h2&gt;
&lt;p&gt;JOSDK automatically schedules retries whenever your &lt;code&gt;Reconciler&lt;/code&gt; throws an exception. This robust retry mechanism helps handle transient issues like network problems or temporary resource unavailability.&lt;/p&gt;
&lt;h3 id="default-retry-behavior"&gt;Default Retry Behavior&lt;/h3&gt;
&lt;p&gt;The default retry implementation covers most typical use cases with exponential backoff:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-java" data-lang="java"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#000"&gt;GenericRetry&lt;/span&gt;&lt;span style="color:#000;font-weight:bold"&gt;.&lt;/span&gt;&lt;span style="color:#c4a000"&gt;defaultLimitedExponentialRetry&lt;/span&gt;&lt;span style="color:#000;font-weight:bold"&gt;()&lt;/span&gt;&lt;span style="color:#f8f8f8"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f8f8f8"&gt; &lt;/span&gt;&lt;span style="color:#000;font-weight:bold"&gt;.&lt;/span&gt;&lt;span style="color:#c4a000"&gt;setInitialInterval&lt;/span&gt;&lt;span style="color:#000;font-weight:bold"&gt;(&lt;/span&gt;&lt;span style="color:#000"&gt;5000&lt;/span&gt;&lt;span style="color:#000;font-weight:bold"&gt;)&lt;/span&gt;&lt;span style="color:#f8f8f8"&gt; &lt;/span&gt;&lt;span style="color:#8f5902;font-style:italic"&gt;// Start with 5-second delay&lt;/span&gt;&lt;span style="color:#f8f8f8"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f8f8f8"&gt; &lt;/span&gt;&lt;span style="color:#000;font-weight:bold"&gt;.&lt;/span&gt;&lt;span style="color:#c4a000"&gt;setIntervalMultiplier&lt;/span&gt;&lt;span style="color:#000;font-weight:bold"&gt;(&lt;/span&gt;&lt;span style="color:#000"&gt;1&lt;/span&gt;&lt;span style="color:#000;font-weight:bold"&gt;.&lt;/span&gt;&lt;span style="color:#c4a000"&gt;5D&lt;/span&gt;&lt;span style="color:#000;font-weight:bold"&gt;)&lt;/span&gt;&lt;span style="color:#f8f8f8"&gt; &lt;/span&gt;&lt;span style="color:#8f5902;font-style:italic"&gt;// Increase delay by 1.5x each retry&lt;/span&gt;&lt;span style="color:#f8f8f8"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f8f8f8"&gt; &lt;/span&gt;&lt;span style="color:#000;font-weight:bold"&gt;.&lt;/span&gt;&lt;span style="color:#c4a000"&gt;setMaxAttempts&lt;/span&gt;&lt;span style="color:#000;font-weight:bold"&gt;(&lt;/span&gt;&lt;span style="color:#000"&gt;5&lt;/span&gt;&lt;span style="color:#000;font-weight:bold"&gt;);&lt;/span&gt;&lt;span style="color:#f8f8f8"&gt; &lt;/span&gt;&lt;span style="color:#8f5902;font-style:italic"&gt;// Maximum 5 attempts&lt;/span&gt;&lt;span style="color:#f8f8f8"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="configuration-options"&gt;Configuration Options&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Using the &lt;code&gt;@GradualRetry&lt;/code&gt; annotation:&lt;/strong&gt;&lt;/p&gt;</description></item><item><title>Event sources and related topics</title><link>https://aerben.github.io/josdk-docs-test/v5.3/docs/documentation/eventing/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://aerben.github.io/josdk-docs-test/v5.3/docs/documentation/eventing/</guid><description>&lt;h2 id="handling-related-events-with-event-sources"&gt;Handling Related Events with Event Sources&lt;/h2&gt;
&lt;p&gt;See also
this &lt;a href="https://csviri.medium.com/java-operator-sdk-introduction-to-event-sources-a1aab5af4b7b"&gt;blog post&lt;/a&gt;
.&lt;/p&gt;
&lt;p&gt;Event sources are a relatively simple yet powerful and extensible concept to trigger controller
executions, usually based on changes to dependent resources. You typically need an event source
when you want your &lt;code&gt;Reconciler&lt;/code&gt; to be triggered when something occurs to secondary resources
that might affect the state of your primary resource. This is needed because a given
&lt;code&gt;Reconciler&lt;/code&gt; will only listen by default to events affecting the primary resource type it is
configured for. Event sources act as listen to events affecting these secondary resources so
that a reconciliation of the associated primary resource can be triggered when needed. Note that
these secondary resources need not be Kubernetes resources. Typically, when dealing with
non-Kubernetes objects or services, we can extend our operator to handle webhooks or websockets
or to react to any event coming from a service we interact with. This allows for very efficient
controller implementations because reconciliations are then only triggered when something occurs
on resources affecting our primary resources thus doing away with the need to periodically
reschedule reconciliations.&lt;/p&gt;</description></item><item><title>Working with EventSource caches</title><link>https://aerben.github.io/josdk-docs-test/v5.3/docs/documentation/working-with-es-caches/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://aerben.github.io/josdk-docs-test/v5.3/docs/documentation/working-with-es-caches/</guid><description>&lt;p&gt;As described in &lt;a href="https://aerben.github.io/josdk-docs-test/v5.3/docs/documentation/eventing/"&gt;Event sources and related topics&lt;/a&gt;, event sources serve as the backbone
for caching resources and triggering reconciliation for primary resources that are related
to these secondary resources.&lt;/p&gt;
&lt;p&gt;In the Kubernetes ecosystem, the component responsible for this is called an Informer. Without delving into
the details (there are plenty of excellent resources online about informers), informers
watch resources, cache them, and emit events when resources change.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;EventSource&lt;/code&gt; is a generalized concept that extends the Informer pattern to non-Kubernetes resources,
allowing you to cache external resources and trigger reconciliation when those resources change.&lt;/p&gt;</description></item><item><title>Other Features</title><link>https://aerben.github.io/josdk-docs-test/v5.3/docs/documentation/features/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://aerben.github.io/josdk-docs-test/v5.3/docs/documentation/features/</guid><description>&lt;p&gt;The Java Operator SDK (JOSDK) is a high-level framework and tooling suite for implementing Kubernetes operators. By default, features follow best practices in an opinionated way. However, configuration options and feature flags are available to fine-tune or disable these features.&lt;/p&gt;
&lt;h2 id="support-for-well-known-kubernetes-resources"&gt;Support for Well-Known Kubernetes Resources&lt;/h2&gt;
&lt;p&gt;Controllers can be registered for standard Kubernetes resources (not just custom resources), such as &lt;code&gt;Ingress&lt;/code&gt;, &lt;code&gt;Deployment&lt;/code&gt;, and others.&lt;/p&gt;
&lt;p&gt;See the &lt;a href="https://github.com/operator-framework/java-operator-sdk/blob/main/operator-framework/src/test/java/io/javaoperatorsdk/operator/baseapi/deployment"&gt;integration test&lt;/a&gt; for an example of reconciling deployments.&lt;/p&gt;</description></item><item><title>Architecture and Internals</title><link>https://aerben.github.io/josdk-docs-test/v5.3/docs/documentation/architecture/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://aerben.github.io/josdk-docs-test/v5.3/docs/documentation/architecture/</guid><description>&lt;p&gt;This document provides an overview of the Java Operator SDK&amp;rsquo;s internal structure and components to help developers understand and contribute to the project. While not a comprehensive reference, it introduces core concepts that should make other components easier to understand.&lt;/p&gt;
&lt;h2 id="the-big-picture-and-core-components"&gt;The Big Picture and Core Components&lt;/h2&gt;
&lt;p&gt;&lt;img src="https://aerben.github.io/josdk-docs-test/v5.3/images/architecture.svg" alt="JOSDK architecture"&gt;&lt;/p&gt;
&lt;p&gt;An &lt;a href="https://github.com/java-operator-sdk/java-operator-sdk/blob/main/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/Operator.java"&gt;Operator&lt;/a&gt; is a set of independent &lt;a href="https://github.com/java-operator-sdk/java-operator-sdk/blob/main/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/Controller.java"&gt;controllers&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;Controller&lt;/code&gt; class is an internal class managed by the framework and typically shouldn&amp;rsquo;t be interacted with directly. It manages all processing units involved with reconciling a single type of Kubernetes resource.&lt;/p&gt;</description></item></channel></rss>