-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
presence of quarkus-container-image-s2i
extension causes wrong java -jar
argument in pod spec
#7712
Comments
I don't really know much about what has been for s2i TBH and what the requirements were |
@Ladicek: The artifcat that is uploaded is always renamed to "application-${quarkus.package.runner-suffix}.jar". So, the cmd uses the intended value. The Why do we create a custom command and not use JAVA_APP_JAR? Why do we rename the artifact? |
@iocanel any particular reason why jar-path doesn't reflect the app name and version? just se don't have to parameterise that everywhere else or ? |
Convenience mostly.
|
This only happens if I let the S2I extension start the S2I build. If I use If I don't use the S2I extension, I get all the S2I binary build resources generated, and the deployment/deploymentconfig don't include the full Just adding the S2I extension changes behavior in unexpected ways. |
@Ladicek just want to be sure you are not conflating s2i source and s2i binary behaviours ? |
ah - you are saying if you call oc start-build manually things works differently - good point. |
Yeah, I'll work on that.
…On Tue, Mar 10, 2020, 12:09 Max Rydahl Andersen ***@***.***> wrote:
ah - you are saying if you call oc start-build manually things works
differently - good point.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#7712?email_source=notifications&email_token=AADCEWEH3BPXB755T7FTL3DRGYGWXA5CNFSM4LEPHVWKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEOKZFUI#issuecomment-597005009>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADCEWHSPMU5YGGRXGZBRJDRGYGWXANCNFSM4LEPHVWA>
.
|
Yea, I'm not doing S2I source builds in any way, this is all about S2I binary builds. |
fix(#7712): S2i build no longer renames artifacts
Describe the bug
I use the
quarkus-container-image-s2i
extension to be able to customize the S2I base image for my application. I thenoc apply -f target/kubernetes/openshift.yml
andoc start-build <app name> --from-dir=target
to deploy my application, which is the usual S2I binary build flow.However, the mere presence of this extension causes a significant difference in how the Kubernetes
Deployment
(or OpenShiftDeploymentConfig
) is generated. If the S2I extension is present, the pod spec template contains a fulljava -jar ... -cp ...
command. This command seems to always readjava -jar /deployments/application-runner.jar ...
, even though the JAR itself is not calledapplication-runner.jar
. In case of OpenShift, an env varJAVA_APP_JAR
is also generated, and its value is the correct path to the JAR.This is probably tailored towards the S2I extension building the image itself, but that is a severely restrictive requirement.
Is generating the
java -jar ... -cp ...
command really necessary? The JDK base images typically know how to use a single JAR in/deployments
(which already happens if I don't include thequarkus-container-image-s2i
extension).Expected behavior
I can use the generated
target/kubernetes/openshift.yml
as is, without change.Actual behavior
When the
quarkus-container-image-s2i
extension is present, the generatedtarget/kubernetes/openshift.yml
uses extraneous configuration that prevents the deployment from succeeding.To Reproduce
Steps to reproduce the behavior:
quarkus-kubernetes
andquarkus-container-image-s2i
extensions.mvn clean package -DskipTests
.target/kubernetes/*.yml
.Configuration
Additional context
Compared to 1.3.0.Alpha2, this is actually a regression.
The text was updated successfully, but these errors were encountered: