quarkus.kubernetes.deployment-target=knative not working with Quarkus 1.9, works fine with Quarkus 1.8.2.Final / 1.7.5.Final. Running on OpenShift 4.5 with OpenShift Serverless.
The main message I see in log of the final pod is ERROR Neither $JAVA_MAIN_CLASS nor $JAVA_APP_JAR is set and 0 JARs found in /deployments (1 expected)
The problem I see is that with knative /deployments is still looked at while the path should be /deployments/target
When I switch to quarkus.kubernetes.deployment-target=openshift application starts properly from /deployments/target
reproducer:
oc new-project rsvoboda
rm -rf getting-started
mvn io.quarkus:quarkus-maven-plugin:1.9.0.Final:create \
-DprojectGroupId=org.acme \
-DprojectArtifactId=getting-started \
-DclassName="org.acme.getting.started.GreetingResource" \
-Dpath="/hello" \
-Dextensions="openshift, smallrye-health"
cd getting-started
cat > src/main/resources/application.properties <<EOF
quarkus.s2i.base-jvm-image=registry.access.redhat.com/openjdk/openjdk-11-rhel7
quarkus.container-image.registry=image-registry.openshift-image-registry.svc:5000
quarkus.container-image.group=rsvoboda
quarkus.kubernetes.deployment-target=knative
quarkus.kubernetes-client.trust-certs=true
EOF
mvn clean package -Dquarkus.kubernetes.deploy=true -Dquarkus-plugin.version=1.8.2.Final -Dquarkus.platform.version=1.8.2.Final
==> application gets available, e.g. http://getting-started-rsvoboda.apps.ocp45.dynamic.quarkus/hello in my case
mvn clean package -Dquarkus.kubernetes.deploy=true
==> application is not available, CrashLoop Error in console
Error from pod:
Starting the Java application using /opt/jboss/container/java/run/run-java.sh ...
[0;31mERROR Neither $JAVA_MAIN_CLASS nor $JAVA_APP_JAR is set and 0 JARs found in /deployments (1 expected)[0m
INFO exec java -javaagent:/opt/jboss/container/jolokia/jolokia.jar=config=/opt/jboss/container/jolokia/etc/jolokia.properties -XX:+UseParallelOldGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:MaxMetaspaceSize=100m -XX:+ExitOnOutOfMemoryError -cp "." -jar
Error: -jar requires jar file specification
Usage: java [options] <mainclass> [args...]
(to execute a class)
...
Tried to set quarkus.s2i.jar-directory and quarkus.openshift.jar-directory but it didn't help in my experiments.
quarkus.kubernetes.deployment-target=knative
not working with Quarkus 1.9, works fine with Quarkus 1.8.2.Final / 1.7.5.Final. Running on OpenShift 4.5 with OpenShift Serverless.The main message I see in log of the final pod is
ERROR Neither $JAVA_MAIN_CLASS nor $JAVA_APP_JAR is set and 0 JARs found in /deployments (1 expected)
The problem I see is that with knative
/deployments
is still looked at while the path should be/deployments/target
When I switch to
quarkus.kubernetes.deployment-target=openshift
application starts properly from/deployments/target
reproducer:
Error from pod:
Tried to set
quarkus.s2i.jar-directory
andquarkus.openshift.jar-directory
but it didn't help in my experiments.https://github.com/quarkusio/quarkus/issues/12894
$upstream:12894$