Description
This issue has been already discussed in the quarkus-sme@redhat.com (Topic "Quarkus deployment on OpenShift"). After several attempts we could narrow the issue and come up with a workaround but the main issue is still unresolved.
Scenario: The customer is trying to deploy on OpenShift 4.x a basic Quarkus quickstart project (attached to this JIRA). The user is authorized to use the JVM "ubi8-openjdk-11:1.14-12.1675788288" available in the OpenShift repository, therefore we set the property "quarkus.openshift.base-jvm-image".
By running:
mvn clean package -Dquarkus.kubernetes.deploy=true -Dquarkus.openshift.base-jvm-image=ubi8-openjdk-11:1.14-12.1675788288 -Dquarkus.openshift.namespace=buildtest
It fails with:
[ERROR] [error]: Build step io.quarkus.container.image.openshift.deployment.OpenshiftProcessor#openshiftBuildFromJar threw an exception: io.fabric8.kubernetes.client.KubernetesClientException: Operation: [list] for kind: [Event] with name: [null] in namespace: [buildtest] failed.
As next step, we have tried setting higher memory limits and increasing the build timeout.
mvn clean package -Dquarkus.kubernetes.deploy=true -Dquarkus.openshift.resources.limits.memory=1024Mi -Dquarkus.openshift.resources.requests.memory=512Mi -Dquarkus.openshift.env.vars.JAVA_DEBUG=true -Dquarkus.openshift.build-timeout=PT10M -Dquarkus.openshift.base-jvm-image=ubi8-openjdk-11:1.14-12.1675788288 -Dquarkus.openshift.namespace=buildtest
However the issue persists. I'm attaching the build log and the output of 'oc get events'.
At the moment, the workaround they have is to edit the Kubernetes Manifest file, setting the ImageStreamTag they need to use:
sourceStrategy:
from:
kind: ImageStreamTag
namespace: openshift
name: 'ubi8-openjdk-11:1.14-12.1675788288'
And then:
oc start-build container --from-dir=target\quarkus-app
As this process works out successfully, I think this issue is peculiar of the openshift extension.