Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
17 changes: 16 additions & 1 deletion .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,22 @@ jobs:
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'
distribution: 'graalvm-community'
cache: 'maven'
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Build SDK
run: ./mvnw install -DskipTests

Expand All @@ -58,4 +68,9 @@ 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 }}
if [ "${{ matrix.sample }}" = "sample-operators/operations" ]; then
./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
86 changes: 86 additions & 0 deletions sample-operators/operations/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,90 @@
</plugins>
</build>

<profiles>
<profile>
<id>native</id>
<build>
<finalName>operations-operator</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>io.javaoperatorsdk.operator.sample.operations.OperationsSampleOperator</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.graalvm.buildtools</groupId>
<artifactId>native-maven-plugin</artifactId>
<version>1.1.0</version>
<extensions>true</extensions>
<configuration>
<imageName>operations-operator</imageName>
<mainClass>io.javaoperatorsdk.operator.sample.operations.OperationsSampleOperator</mainClass>
<fallback>false</fallback>
<metadataRepository>
<enabled>true</enabled>
</metadataRepository>
<buildArgs>
<buildArg>--no-fallback</buildArg>
<buildArg>--enable-url-protocols=http,https</buildArg>
<buildArg>-H:+ReportExceptionStackTraces</buildArg>
<buildArg>-H:+UnlockExperimentalVMOptions</buildArg>
<buildArg>-H:+AddAllCharsets</buildArg>
<buildArg>--initialize-at-run-time=org.apache.logging.log4j.core.filter.MutableThreadContextMapFilter</buildArg>
</buildArgs>
</configuration>
<executions>
<execution>
<id>build-native</id>
<goals>
<goal>compile-no-fork</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<version>${jib-maven-plugin.version}</version>
<configuration>
<from>
<image>gcr.io/distroless/java-base-debian12</image>
</from>
<to>
<image>operations-operator</image>
</to>
<containerizingMode>packaged</containerizingMode>
<extraDirectories>
<paths>
<path>
<from>${project.build.directory}</from>
<includes>operations-operator</includes>
<into>/app</into>
</path>
</paths>
<permissions>
<permission>
<file>/app/operations-operator</file>
<mode>755</mode>
</permission>
</permissions>
</extraDirectories>
<container>
<entrypoint>/app/operations-operator</entrypoint>
<jvmFlags combine.self="override"/>
</container>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
[
{
"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.fabric8.kubernetes.api.model.DefaultKubernetesResourceList",
"allDeclaredFields": true,
"allDeclaredMethods": true,
"allDeclaredConstructors": true,
"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,
"allDeclaredConstructors": true,
"allPublicConstructors": true
},
{
"name": "io.javaoperatorsdk.operator.processing.event.rate.LinearRateLimiter",
"allDeclaredMethods": true,
"allDeclaredConstructors": true,
"allPublicConstructors": true
}
]
Original file line number Diff line number Diff line change
@@ -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": []
}
Loading