Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
fbce8b2
chore: set next version to 999-SNAPSHOT (#3469)
csviri Jul 3, 2026
7e5a900
improve: integration test to showcase external resource state in stat…
csviri Jul 29, 2026
3fecf20
Informer pools (#3325)
csviri Aug 1, 2026
873eca1
chore(deps): bump org.apache.maven.plugins:maven-jar-plugin (#3511)
dependabot[bot] Jul 23, 2026
0ddecbd
chore(deps): bump openrewrite.version from 8.87.5 to 8.87.7 (#3510)
dependabot[bot] Jul 23, 2026
eb7958d
chore(deps): bump com.diffplug.spotless:spotless-maven-plugin from 3.…
dependabot[bot] Jul 28, 2026
fffe39c
fix: use explicit JSON merge patch type in merge patch operations (#3…
csviri Jul 28, 2026
9e5927a
test: verify Kotlin interop with a unit test and a Kotlin sample oper…
hej090224 Jul 29, 2026
8ad1115
chore(deps): bump openrewrite.version from 8.87.7 to 8.88.0 (#3516)
dependabot[bot] Jul 30, 2026
14912ba
docs: facelift of operator list in README.md (#3534)
csviri Aug 1, 2026
510e173
fix: new kotlin sample parent version
csviri Aug 1, 2026
907fe61
fix: set configuration service for default pool (#3535)
csviri Aug 3, 2026
9272c99
perf: size the workflow result map from Workflow#size (#3547)
csviri Aug 11, 2026
aa809d4
refactor: drop the unused Options parameter of desiredForJsonPatch (#…
csviri Aug 11, 2026
db9a0fa
refactor: call existing helpers instead of re-implementing them (#3544)
csviri Aug 11, 2026
592bad3
test: fix flaky finalizer removal in TriggerReconcilerOnAllEventIT (#…
csviri Aug 11, 2026
d4bd3da
feat: detect dependent resource API version changes (#3536)
hej090224 Aug 11, 2026
b5022e2
refactor: resolve the informer target client without a downcast (#3548)
csviri Aug 11, 2026
484727d
refactor: clean up the Kubernetes resource matchers (#3546)
csviri Aug 11, 2026
51490a2
improve: followup PR for Informer Pools (#3541)
csviri Aug 12, 2026
9010df1
refactor: let ResourceState own the trigger-on-all-events flag (#3549)
csviri Aug 13, 2026
eba57e1
perf: avoid redundant work on informer event paths (#3545)
csviri Aug 17, 2026
412e98c
feat: performance tests
csviri Apr 27, 2026
b2bace4
wip
csviri Apr 27, 2026
0317f1a
feat: performance test modules and result history
csviri Aug 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
- "sample-operators/webpage"
- "sample-operators/leader-election"
- "sample-operators/operations"
- "sample-operators/kotlin-operator"
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down
174 changes: 174 additions & 0 deletions .github/workflows/performance-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
name: Performance Tests

env:
MAVEN_ARGS: -V -ntp -e
# branch the results of every run are stored on, created on the first run
RESULTS_BRANCH: performance-test-results
RESULTS_PATH: performance-tests/results

on:
push:
branches:
- main
- next
paths:
- 'operator-framework-core/src/main/**'
- 'performance-tests/**'
workflow_dispatch:

jobs:
jmh-benchmarks:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v6
- name: Set up Java and Maven
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: 17
cache: 'maven'
- name: Build project
run: ./mvnw ${MAVEN_ARGS} install -DskipTests --file pom.xml
- name: Run JMH benchmarks
run: |
java -Dperformance.results.dir=performance-tests/jmh/target/performance-results \
-Dperformance.results.branch=${{ github.ref_name }} \
-jar performance-tests/jmh/target/benchmarks.jar \
-rf json -rff performance-tests/jmh/target/jmh-result.json
- name: Upload benchmark results
uses: actions/upload-artifact@v4
with:
name: jmh-result
path: performance-tests/jmh/target/jmh-result.json
- name: Upload performance results
uses: actions/upload-artifact@v4
with:
name: performance-results-jmh
path: performance-tests/jmh/target/performance-results
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
if: github.ref == 'refs/heads/main'
with:
tool: 'jmh'
output-file-path: performance-tests/jmh/target/jmh-result.json
auto-push: true
alert-threshold: '130%'
comment-on-alert: true
fail-on-alert: false
gh-pages-branch: gh-pages
benchmark-data-dir-path: dev/bench

in-process-tests:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v6
- name: Set up Java and Maven
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: 17
cache: 'maven'
- name: Run in-process performance tests
run: |
./mvnw ${MAVEN_ARGS} install -DskipTests --file pom.xml
./mvnw ${MAVEN_ARGS} verify -P performance-tests \
-Dperformance.results.branch=${{ github.ref_name }} \
-pl performance-tests/jmh --file pom.xml
- name: Upload performance results
uses: actions/upload-artifact@v4
with:
name: performance-results-in-process
path: performance-tests/jmh/target/performance-results

e2e-performance-tests:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v6
- name: Set up Java and Maven
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: 17
cache: 'maven'
- name: Set up Minikube
uses: manusa/actions-setup-minikube@v2.18.0
with:
minikube version: 'v1.38.1'
kubernetes version: 'v1.35.2'
github token: ${{ github.token }}
- name: Run performance tests against the cluster
run: |
./mvnw ${MAVEN_ARGS} install -DskipTests --file pom.xml
./mvnw ${MAVEN_ARGS} verify -P performance-tests \
-Dperformance.results.branch=${{ github.ref_name }} \
-pl performance-tests/e2e --file pom.xml
- name: Upload performance results
uses: actions/upload-artifact@v4
with:
name: performance-results-e2e
path: performance-tests/e2e/target/performance-results

publish-results:
needs: [jmh-benchmarks, in-process-tests, e2e-performance-tests]
# results of a partially failed run would be misleading when comparing commits, and only the
# long living branches are worth keeping a history for
if: github.ref_name == 'main' || github.ref_name == 'next'
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: write
steps:
- uses: actions/checkout@v6
- name: Set up Java and Maven
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: 17
cache: 'maven'
- name: Build the results tooling
run: |
./mvnw ${MAVEN_ARGS} package -Dmaven.test.skip=true \
-pl performance-tests/reporting -am --file pom.xml
- name: Download the results of all performance test jobs
uses: actions/download-artifact@v4
with:
pattern: performance-results-*
# all jobs of a run write into the same directory, named after the commit
merge-multiple: true
path: collected-results
- name: Check out the results branch
env:
REPOSITORY_URL: https://x-access-token:${{ github.token }}@github.com/${{ github.repository }}.git
run: |
set -euo pipefail
if git ls-remote --exit-code --heads "$REPOSITORY_URL" "$RESULTS_BRANCH" > /dev/null; then
git clone --depth 1 --branch "$RESULTS_BRANCH" "$REPOSITORY_URL" results-branch
else
# first run: the branch holds only results, so it is started without any history
echo "$RESULTS_BRANCH does not exist yet, creating it"
git init results-branch
git -C results-branch remote add origin "$REPOSITORY_URL"
git -C results-branch checkout -b "$RESULTS_BRANCH"
fi
- name: Add the results of this commit
run: |
mkdir -p "results-branch/$RESULTS_PATH"
cp -R collected-results/. "results-branch/$RESULTS_PATH/"
java -cp performance-tests/reporting/target/performance-results-tools.jar \
io.javaoperatorsdk.operator.performance.results.ResultsIndexer \
"results-branch/$RESULTS_PATH"
- name: Push the results
working-directory: results-branch
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add "$RESULTS_PATH"
if git diff --cached --quiet; then
echo "No new results to store"
exit 0
fi
git commit -m "perf: results of ${{ github.ref_name }} at ${GITHUB_SHA:0:7}"
git push origin "HEAD:$RESULTS_BRANCH"
22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,19 +65,21 @@ projects want to advertise that fact here. For this reason, we ask that if you'd
to be featured in this section, please open a PR, adding a link to and short description of your
project, as shown below:

- [kroxylicious](https://github.com/kroxylicious/kroxylicious/tree/main/kroxylicious-kubernetes/kroxylicious-operator) Kafka proxy operator
- [ExposedApp operator](https://github.com/halkyonio/exposedapp-rhdblog): a sample operator
written to illustrate JOSDK concepts and its Quarkus extension in the ["Write Kubernetes
Operators in Java with the Java Operator SDK" blog series](https://developers.redhat.com/articles/2022/02/15/write-kubernetes-java-java-operator-sdk#).
- [Keycloak operator](https://github.com/keycloak/keycloak/tree/main/operator): the official
Keycloak operator, built with Quarkus and JOSDK.
- [Apache Flink Kubernetes operator](https://github.com/apache/flink-kubernetes-operator) is the market leader among Flink operators.
- [Apache Flink Kubernetes Operator](https://github.com/apache/flink-kubernetes-operator) is the market leader among Flink operators.
- [Apache Spark Kubernetes Operator](https://github.com/apache/spark-kubernetes-operator) emerging operator for Spark.
- [kroxylicious](https://github.com/kroxylicious/kroxylicious/tree/main/kroxylicious-kubernetes/kroxylicious-operator) Kafka proxy operator
- [Debezium Operator](https://github.com/debezium/debezium-operator): Debezium Operator adds Change-Data-Capture capabilities to your Kubernetes or OpenShift cluster by providing an easy way to run and manage [Debezium Server](https://debezium.io/documentation/reference/stable/operations/debezium-server.html) instances.
- [Keycloak operator](https://github.com/keycloak/keycloak/tree/main/operator): the official Keycloak operator, built with Quarkus and JOSDK.
- [Apache Hive Kubernetes Operator](https://github.com/apache/hive/tree/master/packaging/src/kubernetes/src/java/org/apache/hive/kubernetes/operator)
- [OpenMetadata Operator](https://github.com/open-metadata/OpenMetadata/tree/main/openmetadata-k8s-operator) for AI context, data cataloging, and metadata management service
- [Strimzi Access operator](https://github.com/strimzi/kafka-access-operator). While the core Strimzi operator development predates
JOSDK, but new components like the Access operator is using the framework.
- [Wanaku](https://github.com/wanaku-ai/wanaku/tree/main/apps/wanaku-operator) MCP Router Operator
- [Apicurio Registry Operator](https://github.com/Apicurio/apicurio-registry/tree/main/operator)
- [Kaap](https://github.com/datastax/kaap) autoscaling Operator for Apache Pulsar
- [EureKubeOperator](https://medium.com/@heesuk.dev/implementing-kubernetes-operator-for-eureka-service-discovery-integration-by-java-operator-sdk-d21d8087c38e): integrates service discovery of Eureka and Kubernetes using the framework - developed by 11street. It is not released as an open source yet but is very interesting to read about this problem and how it is solved by an operator written with JOSDK.
- [Locust k8s operator](https://github.com/AbdelrhmanHamouda/locust-k8s-operator): Cloud native solution to run performance tests on any Kubernetes cluster.
- [Strimzi Schema Registry Operator](https://github.com/shangyuantech/strimzi-registry-ksql-operator): A Schema Registry Operator based on JOSDK for running the Confluent Schema Registry with a Strimzi-based Kafka cluster.
- [Airflow Dag Operator](https://github.com/cdmikechen/airflow-dag-operator): Use JOSDK(Quarkus Extension) to replace Airflow Git Sync strategy. The main idea of the project is to start a synchronization container on each airflow pod to synchronize the DAG/files into the DAG folder.
- [ExposedApp operator](https://github.com/halkyonio/exposedapp-rhdblog): a sample operator
written to illustrate JOSDK concepts and its Quarkus extension in the ["Write Kubernetes
Operators in Java with the Java Operator SDK" blog series](https://developers.redhat.com/articles/2022/02/15/write-kubernetes-java-java-operator-sdk#).
- [Glasskube Operator](https://github.com/glasskube/operator): simplifies the deployment, maintenance and upgrade of popular open source business tools. It is written in Kotlin and uses the JOSDK and fabric8 Kubernetes client with Kotlin-based DSL.
- [Debezium Operator](https://github.com/debezium/debezium-operator): Debezium Operator adds Change-Data-Capture capabilities to your Kubernetes or Openshift cluster by providing an easy way to run and manage [Debezium Server](https://debezium.io/documentation/reference/stable/operations/debezium-server.html) instances.
2 changes: 1 addition & 1 deletion bootstrapper-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>io.javaoperatorsdk</groupId>
<artifactId>java-operator-sdk</artifactId>
<version>5.5.1-SNAPSHOT</version>
<version>999-SNAPSHOT</version>
</parent>

<artifactId>bootstrapper</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion caffeine-bounded-cache-support/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>io.javaoperatorsdk</groupId>
<artifactId>java-operator-sdk</artifactId>
<version>5.5.1-SNAPSHOT</version>
<version>999-SNAPSHOT</version>
</parent>

<artifactId>caffeine-bounded-cache-support</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,14 @@ public List<EventSource<?, P>> prepareEventSources(EventSourceContext<P> context
1); // setting max size for testing purposes

var es =
new InformerEventSource<>(
new InformerEventSource<ConfigMap, P>(
InformerEventSourceConfiguration.from(ConfigMap.class, primaryClass())
.withItemStore(boundedItemStore)
.withSecondaryToPrimaryMapper(
Mappers.fromOwnerReferences(
context.getPrimaryResourceClass(),
this instanceof BoundedCacheClusterScopeTestReconciler))
.build(),
context);
.build());

return List.of(es);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,41 @@ If you encounter this issue on an older Kubernetes version, consider changing yo
that resource, or even upgrading your Kubernetes version. If you encounter it on a newer Kubernetes version, please log
an issue with the JOSDK and with upstream Kubernetes.

### Detecting dependent resource API version changes (experimental)

When a dependent resource's CRD gains a new API version and the operator is upgraded to target it,
comparing `actualResource.getApiVersion()` with the desired resource's API version is not a
reliable way to detect resources that still need to be updated: the Kubernetes API server serves a
resource using the requested, served API version regardless of which version it is actually stored
as, so this comparison would always trivially match.

`KubernetesDependentResource` therefore ignores `apiVersion` when matching. To still force a
one-time update of dependent resources after such an upgrade, without triggering an update on every
reconciliation, `KubernetesDependent` provides the opt-in, experimental
`detectApiVersionChange` flag:

```java
@KubernetesDependent(detectApiVersionChange = true)
public class MyDependentResource extends CRUDKubernetesDependentResource<MyResource, MyPrimary> {
// ...
}
```

When enabled, JOSDK records the API version it applies in the `javaoperatorsdk.io/last-applied-api-version`
annotation. On subsequent reconciliations, the resource is considered mismatched (and thus updated)
if that recorded marker differs from the API version the operator currently uses - this also
covers resources that predate this feature and therefore have no marker at all. Once the resource
has been updated, the marker matches the current API version again, so no further update is
requested until the API version changes again.

This is disabled by default: existing behavior, including for resources created before this
feature existed, is unaffected unless you opt in. It does not read or infer the actual storage
version of the resource from the Kubernetes API, since that information is not reliably exposed;
it only tracks what the operator itself last applied. It is also not a replacement for
Kubernetes' [StorageVersionMigration](https://kubernetes.io/docs/tasks/manage-kubernetes-objects/storage-version-migration/),
which addresses migrating the stored representation of resources, a concern orthogonal to this
feature.

## Telling JOSDK how to find which secondary resources are associated with a given primary resource

[`KubernetesDependentResource`](https://github.com/java-operator-sdk/java-operator-sdk/blob/main/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/dependent/kubernetes/KubernetesDependentResource.java)
Expand Down
2 changes: 1 addition & 1 deletion docs/content/en/docs/documentation/event-filters.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public List<EventSource<?, MyCustomResource>> prepareEventSources(
.withOnAddFilter(cm -> true)
.build();

return List.of(new InformerEventSource<>(informerConfiguration, context));
return List.of(new InformerEventSource<>(informerConfiguration));
}
```

Expand Down
Loading
Loading