-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
quarkus.openshift.arguments
fails on OCP + native mode
#24885
Comments
Can you please paste what the created |
DeploymentConfig (Native mode):
DeploymentConfig (JVM mode):
|
Thanks a lot. One more thing, what does the native |
DeploymentConfig without args (Native mode)
|
Thanks a lot. @iocanel it seems that |
@geoand need to investigate |
When we built images using the In this case, it's not expected work neither for java nor for native. It works on java mode by accident as the default image is not recognized (this is a bug). So, we need to change the expected behavior, but I am not 100% sure which is the way to go. Our options are the following:
|
From my point of view, the correct option should be the third as when no command is added, it should default to the one from the base image. If the base image does not default an entrypoint, then the failure is expected. (The same reasoning is for JVM). |
The problem with that is that it makes things very inconsistent and users can't really anticipate what the behavior is |
Yes, sometimes generate the command and others do not, it's not very user friendly. |
My proposal, is to never generate the command unless explicitly specified. This will allow us to be more predictable without excluding the 3rd party images that may not set the entropoint. This can be done using a property like: |
After sleeping enough on it, I am leaning towards on never generating the command. |
I also experienced this inconsistence between java and native mode and IHMO the conclusion you settled on should be documented. If you just add mvn io.quarkus.platform:quarkus-maven-plugin:2.8.3.Final:create -DprojectGroupId=org.acme -DprojectArtifactId=oc -Dextensions=quarkus-openshift
cd oc
mvn clean install -Dquarkus.native.container-runtime=docker -Dquarkus.native.container-build=true -Dquarkus.openshift.route.expose=true -Dquarkus.kubernetes.deploy=true -Dquarkus.kubernetes-client.trust-certs=true -Dquarkus.openshift.arguments=A,B -Dnative
# BUILD SUCCESS, but pod status is 'CreateContainerError' If user provides his own I'd like to set command by default if |
I'd like to understand this sentence better, please. Does you assume that if user doesn't define |
@michalvavrik: Here's how I understand things. How kubernetes manifests work
The last two practically mean that there is no point in having a manifest just containing Why does it happen just in native?Because in some cases, based on the A proper solutionThe fact that the current behavior is pretty hard to even explain without a flow chart, is a clear indication that we are wrong and that this part is overengineered. So, IMHO the proper solution should be to remove conditional logic. Suggested change: Never ever set default values for command / argumentsThis means that:
@michalvavrik: Tried to provide a summary. Hope it explains things better. |
Describe the bug
When I deploy a native application that requires custom java arguments into OCP 4.10 the container crash at creation/start time with the following error:
Appliction.properties:
Main class:
Endpoint
Works in JVM mode fails in native mode (over OCP)
How to reproduce
Requirements:
Reproducer:
Module: lifecycle-application
Expected behavior
Same as JVM mode
The text was updated successfully, but these errors were encountered: