From 70b1357f51440044aceda8810d81157ae56698b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Attila=20M=C3=A9sz=C3=A1ros?= Date: Wed, 20 May 2026 14:03:31 +0200 Subject: [PATCH 1/9] wip MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Attila Mészáros --- .github/workflows/e2e-test.yml | 8 +- .../src/main/resources/log4j2.xml | 30 ---- sample-operators/operations/pom.xml | 86 ++++++++++ .../sample-operations/reflect-config.json | 157 ++++++++++++++++++ .../sample-operations/resource-config.json | 12 ++ 5 files changed, 261 insertions(+), 32 deletions(-) delete mode 100644 sample-operators/controller-namespace-deletion/src/main/resources/log4j2.xml create mode 100644 sample-operators/operations/src/main/resources/META-INF/native-image/io.javaoperatorsdk/sample-operations/reflect-config.json create mode 100644 sample-operators/operations/src/main/resources/META-INF/native-image/io.javaoperatorsdk/sample-operations/resource-config.json diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index eef0f3fde4..d15e4461b0 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -45,7 +45,7 @@ jobs: uses: actions/setup-java@v5 with: java-version: 25 - distribution: temurin + distribution: graalvm-community cache: 'maven' - name: Build SDK @@ -58,4 +58,8 @@ jobs: - name: Run E2E tests as a deployment run: | eval $(minikube -p minikube docker-env) - ./mvnw jib:dockerBuild test -P end-to-end-tests -Dtest.deployment=remote -pl ${{ matrix.sample }} + EXTRA_PROFILES="" + if [ "${{ matrix.sample }}" = "sample-operators/operations" ]; then + EXTRA_PROFILES=",native" + fi + ./mvnw package jib:dockerBuild test -P end-to-end-tests${EXTRA_PROFILES} -Dtest.deployment=remote -pl ${{ matrix.sample }} diff --git a/sample-operators/controller-namespace-deletion/src/main/resources/log4j2.xml b/sample-operators/controller-namespace-deletion/src/main/resources/log4j2.xml deleted file mode 100644 index 147f494c1d..0000000000 --- a/sample-operators/controller-namespace-deletion/src/main/resources/log4j2.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - diff --git a/sample-operators/operations/pom.xml b/sample-operators/operations/pom.xml index 5813767244..969d54ded5 100644 --- a/sample-operators/operations/pom.xml +++ b/sample-operators/operations/pom.xml @@ -132,4 +132,90 @@ + + + native + + operations-operator + + + org.apache.maven.plugins + maven-jar-plugin + + + + io.javaoperatorsdk.operator.sample.operations.OperationsSampleOperator + + + + + + org.graalvm.buildtools + native-maven-plugin + 1.1.0 + true + + operations-operator + io.javaoperatorsdk.operator.sample.operations.OperationsSampleOperator + false + + true + + + --no-fallback + --enable-url-protocols=http,https + -H:+ReportExceptionStackTraces + -H:+UnlockExperimentalVMOptions + -H:+AddAllCharsets + --initialize-at-run-time=org.apache.logging.log4j.core.filter.MutableThreadContextMapFilter + + + + + build-native + + compile-no-fork + + package + + + + + com.google.cloud.tools + jib-maven-plugin + ${jib-maven-plugin.version} + + + gcr.io/distroless/base-debian12 + + + operations-operator + + packaged + + + + ${project.build.directory} + operations-operator + /app + + + + + /app/operations-operator + 755 + + + + + /app/operations-operator + + + + + + + + + diff --git a/sample-operators/operations/src/main/resources/META-INF/native-image/io.javaoperatorsdk/sample-operations/reflect-config.json b/sample-operators/operations/src/main/resources/META-INF/native-image/io.javaoperatorsdk/sample-operations/reflect-config.json new file mode 100644 index 0000000000..8f870961ca --- /dev/null +++ b/sample-operators/operations/src/main/resources/META-INF/native-image/io.javaoperatorsdk/sample-operations/reflect-config.json @@ -0,0 +1,157 @@ +[ + { + "name": "io.javaoperatorsdk.operator.sample.operations.customresource.OperationsCustomResource1", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true, + "queryAllDeclaredMethods": true, + "queryAllDeclaredConstructors": true + }, + { + "name": "io.javaoperatorsdk.operator.sample.operations.customresource.OperationsCustomResource2", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true, + "queryAllDeclaredMethods": true, + "queryAllDeclaredConstructors": true + }, + { + "name": "io.javaoperatorsdk.operator.sample.operations.customresource.OperationsSpec", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "name": "io.javaoperatorsdk.operator.sample.operations.customresource.OperationsStatus", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "name": "io.javaoperatorsdk.operator.sample.operations.OperationsReconciler1", + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "name": "io.javaoperatorsdk.operator.sample.operations.OperationsReconciler2", + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "name": "io.javaoperatorsdk.operator.sample.operations.AbstractOperationsReconciler", + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "name": "io.micrometer.registry.otlp.AggregationTemporality", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicMethods": true + }, + { + "name": "io.micrometer.registry.otlp.HistogramFlavor", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicMethods": true + }, + { + "name": "io.fabric8.kubernetes.client.impl.KubernetesClientImpl", + "allDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicMethods": true, + "allPublicConstructors": true + }, + { + "name": "io.fabric8.kubernetes.client.KubernetesClient", + "allDeclaredMethods": true, + "allPublicMethods": true + }, + { + "name": "io.fabric8.kubernetes.api.model.Config", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicMethods": true, + "allPublicConstructors": true + }, + { + "name": "io.fabric8.kubernetes.api.model.Cluster", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "name": "io.fabric8.kubernetes.api.model.NamedCluster", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "name": "io.fabric8.kubernetes.api.model.Context", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "name": "io.fabric8.kubernetes.api.model.NamedContext", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "name": "io.fabric8.kubernetes.api.model.AuthInfo", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "name": "io.fabric8.kubernetes.api.model.NamedAuthInfo", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "name": "io.fabric8.kubernetes.api.model.NamedExtension", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "name": "io.fabric8.kubernetes.api.model.Preferences", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "name": "io.fabric8.kubernetes.api.model.AuthProviderConfig", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "name": "io.fabric8.kubernetes.api.model.ExecConfig", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "name": "io.fabric8.kubernetes.api.model.ExecEnvVar", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "name": "io.javaoperatorsdk.operator.processing.retry.GenericRetry", + "allDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true + }, + { + "name": "io.javaoperatorsdk.operator.processing.event.rate.LinearRateLimiter", + "allDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true + } +] diff --git a/sample-operators/operations/src/main/resources/META-INF/native-image/io.javaoperatorsdk/sample-operations/resource-config.json b/sample-operators/operations/src/main/resources/META-INF/native-image/io.javaoperatorsdk/sample-operations/resource-config.json new file mode 100644 index 0000000000..780e1e722a --- /dev/null +++ b/sample-operators/operations/src/main/resources/META-INF/native-image/io.javaoperatorsdk/sample-operations/resource-config.json @@ -0,0 +1,12 @@ +{ + "resources": { + "includes": [ + { "pattern": "log4j2\\.xml" }, + { "pattern": "otlp-config\\.yaml" }, + { "pattern": "io/javaoperatorsdk/operator/sample/.*\\.yaml" }, + { "pattern": "META-INF/services/.*" }, + { "pattern": ".*\\.properties" } + ] + }, + "bundles": [] +} From 3092c844622f3dba1486a9347529541b35d8c6f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Attila=20M=C3=A9sz=C3=A1ros?= Date: Wed, 20 May 2026 14:07:39 +0200 Subject: [PATCH 2/9] wip MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Attila Mészáros --- .github/workflows/e2e-test.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index d15e4461b0..37385bdd3c 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -41,12 +41,13 @@ jobs: github token: ${{ secrets.GITHUB_TOKEN }} driver: docker - - name: Set up Java and Maven - uses: actions/setup-java@v5 + - name: Set up GraalVM + uses: graalvm/setup-graalvm@v1 with: - java-version: 25 - distribution: graalvm-community + java-version: '25' + distribution: 'graalvm-community' cache: 'maven' + github-token: ${{ secrets.GITHUB_TOKEN }} - name: Build SDK run: ./mvnw install -DskipTests From f4c391f1104d4d05777cb007b54dfd45d00d484b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Attila=20M=C3=A9sz=C3=A1ros?= Date: Wed, 20 May 2026 14:13:47 +0200 Subject: [PATCH 3/9] wip MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Attila Mészáros --- .github/workflows/e2e-test.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index 37385bdd3c..9dfc92bf19 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -41,7 +41,16 @@ jobs: github token: ${{ secrets.GITHUB_TOKEN }} driver: docker + - name: Set up Java and Maven + if: matrix.sample != 'sample-operators/operations' + uses: actions/setup-java@v5 + with: + java-version: 25 + distribution: temurin + cache: 'maven' + - name: Set up GraalVM + if: matrix.sample == 'sample-operators/operations' uses: graalvm/setup-graalvm@v1 with: java-version: '25' From 573bc65d6adfa5ece39c8eab0bd03dc508644b24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Attila=20M=C3=A9sz=C3=A1ros?= Date: Wed, 20 May 2026 14:21:48 +0200 Subject: [PATCH 4/9] wip MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Attila Mészáros --- .github/workflows/e2e-test.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index 9dfc92bf19..334dd00bb8 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -68,8 +68,9 @@ jobs: - name: Run E2E tests as a deployment run: | eval $(minikube -p minikube docker-env) - EXTRA_PROFILES="" if [ "${{ matrix.sample }}" = "sample-operators/operations" ]; then - EXTRA_PROFILES=",native" + ./mvnw -Pnative package -DskipTests -pl ${{ matrix.sample }} + ./mvnw jib:dockerBuild test -P end-to-end-tests,native -Dtest.deployment=remote -pl ${{ matrix.sample }} + else + ./mvnw jib:dockerBuild test -P end-to-end-tests -Dtest.deployment=remote -pl ${{ matrix.sample }} fi - ./mvnw package jib:dockerBuild test -P end-to-end-tests${EXTRA_PROFILES} -Dtest.deployment=remote -pl ${{ matrix.sample }} From 313545a2d8dfc749911d03e0df731176e7f2bab1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Attila=20M=C3=A9sz=C3=A1ros?= Date: Wed, 20 May 2026 14:29:06 +0200 Subject: [PATCH 5/9] wip MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Attila Mészáros --- .../src/main/resources/log4j2.xml | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 sample-operators/controller-namespace-deletion/src/main/resources/log4j2.xml diff --git a/sample-operators/controller-namespace-deletion/src/main/resources/log4j2.xml b/sample-operators/controller-namespace-deletion/src/main/resources/log4j2.xml new file mode 100644 index 0000000000..147f494c1d --- /dev/null +++ b/sample-operators/controller-namespace-deletion/src/main/resources/log4j2.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + From b5debf2a0df6e478c36d7b006d5b8d5be0200082 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Attila=20M=C3=A9sz=C3=A1ros?= Date: Wed, 20 May 2026 15:52:41 +0200 Subject: [PATCH 6/9] wip MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Attila Mészáros --- sample-operators/operations/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sample-operators/operations/pom.xml b/sample-operators/operations/pom.xml index 969d54ded5..167cc29ce9 100644 --- a/sample-operators/operations/pom.xml +++ b/sample-operators/operations/pom.xml @@ -186,7 +186,7 @@ ${jib-maven-plugin.version} - gcr.io/distroless/base-debian12 + gcr.io/distroless/cc-debian12 operations-operator From de83841129f08463cf7dc6b2eb22a1f777d07c02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Attila=20M=C3=A9sz=C3=A1ros?= Date: Wed, 20 May 2026 16:09:53 +0200 Subject: [PATCH 7/9] wip MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Attila Mészáros --- sample-operators/operations/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sample-operators/operations/pom.xml b/sample-operators/operations/pom.xml index 167cc29ce9..3220111f1f 100644 --- a/sample-operators/operations/pom.xml +++ b/sample-operators/operations/pom.xml @@ -186,7 +186,7 @@ ${jib-maven-plugin.version} - gcr.io/distroless/cc-debian12 + gcr.io/distroless/java-base-debian12 operations-operator From 26a248951b1ff3947af1e5afb88a433a46363299 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Attila=20M=C3=A9sz=C3=A1ros?= Date: Wed, 20 May 2026 20:36:02 +0200 Subject: [PATCH 8/9] wip MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Attila Mészáros --- .../sample-operations/reflect-config.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sample-operators/operations/src/main/resources/META-INF/native-image/io.javaoperatorsdk/sample-operations/reflect-config.json b/sample-operators/operations/src/main/resources/META-INF/native-image/io.javaoperatorsdk/sample-operations/reflect-config.json index 8f870961ca..929397c246 100644 --- a/sample-operators/operations/src/main/resources/META-INF/native-image/io.javaoperatorsdk/sample-operations/reflect-config.json +++ b/sample-operators/operations/src/main/resources/META-INF/native-image/io.javaoperatorsdk/sample-operations/reflect-config.json @@ -142,6 +142,14 @@ "allDeclaredMethods": true, "allDeclaredConstructors": true }, + { + "name": "io.fabric8.kubernetes.api.model.DefaultKubernetesResourceList", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicMethods": true, + "allPublicConstructors": true + }, { "name": "io.javaoperatorsdk.operator.processing.retry.GenericRetry", "allDeclaredMethods": true, From 3d6d6e3bb978c57d3727e823b6a69c621ecdc627 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Attila=20M=C3=A9sz=C3=A1ros?= Date: Wed, 20 May 2026 21:03:12 +0200 Subject: [PATCH 9/9] wip MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Attila Mészáros --- .../sample-operations/reflect-config.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sample-operators/operations/src/main/resources/META-INF/native-image/io.javaoperatorsdk/sample-operations/reflect-config.json b/sample-operators/operations/src/main/resources/META-INF/native-image/io.javaoperatorsdk/sample-operations/reflect-config.json index 929397c246..ee8d190881 100644 --- a/sample-operators/operations/src/main/resources/META-INF/native-image/io.javaoperatorsdk/sample-operations/reflect-config.json +++ b/sample-operators/operations/src/main/resources/META-INF/native-image/io.javaoperatorsdk/sample-operations/reflect-config.json @@ -150,6 +150,14 @@ "allPublicMethods": true, "allPublicConstructors": true }, + { + "name": "io.fabric8.kubernetes.api.model.ListMeta", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicMethods": true, + "allPublicConstructors": true + }, { "name": "io.javaoperatorsdk.operator.processing.retry.GenericRetry", "allDeclaredMethods": true,