Skip to content
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

Cannot deploy "pure" messaging application to Kubernetes #19442

Closed
cescoffier opened this issue Aug 17, 2021 · 5 comments · Fixed by #19616
Closed

Cannot deploy "pure" messaging application to Kubernetes #19442

cescoffier opened this issue Aug 17, 2021 · 5 comments · Fixed by #19616
Assignees
Labels
area/kubernetes kind/bug Something isn't working
Milestone

Comments

@cescoffier
Copy link
Member

Describe the bug

If you have an application that does not run an HTTP server, the OpenShift/Kubernetes metadata generation fails with:

No Openshift manifests were generated (most likely due to the fact that the service is not an HTTP service) so no openshift process will be taking place

It does not fail the build, just do not generate the descriptors and skip the deployment.

Not having an HTTP server is very likely for pure messaging applications that do not expose an HTTP endpoint.

Expected behavior

It should still generate the descriptor and proceed with the deployment.

Actual behavior

It skips the descriptor and deployment.

How to Reproduce?

Use the kafka-quickstart, go to the processor sub-module.
Then run:

> mvn quarkus:add-extension -Dextensions="openshift"
> mvn clean package -Dquarkus.container-image.build=true -DskipTests -Dquarkus.container-image.push=true

Output of uname -a or ver

Darwin bespin.local 20.6.0 Darwin Kernel Version 20.6.0: Wed Jun 23 00:26:31 PDT 2021; root:xnu-7195.141.2~5/RELEASE_X86_64 x86_64

Output of java -version

openjdk version "11.0.11" 2021-04-20 OpenJDK Runtime Environment AdoptOpenJDK-11.0.11+9 (build 11.0.11+9) OpenJDK 64-Bit Server VM AdoptOpenJDK-11.0.11+9 (build 11.0.11+9, mixed mode)

GraalVM version (if different from Java)

no native involved in this issue

Quarkus version or git rev

main branch (999-SNAPSHOT)

Build tool (ie. output of mvnw --version or gradlew --version)

3.8.2

Additional information

No response

@cescoffier cescoffier added the kind/bug Something isn't working label Aug 17, 2021
@quarkus-bot
Copy link

quarkus-bot bot commented Aug 17, 2021

/cc @geoand, @iocanel

@cescoffier
Copy link
Member Author

Workaround:

Add the resteasy reactive extension and a dummy resource:

package org.acme.kafka;

import javax.ws.rs.GET;
import javax.ws.rs.Path;

@Path("/dummy")
public class Dummy {

    @GET
    public String hello() {
        return "hello";
    }
    
}

@geoand
Copy link
Contributor

geoand commented Aug 17, 2021

This is a known limitation that we should lift at some point

@geoand
Copy link
Contributor

geoand commented Aug 24, 2021

So if we want to generate the Kubernetes manifests for application that don't listen to HTTP, we just need to generate a Deployment without ports and no Service.
Right?

Furthermore, I assume there will no readiness and liveness probes

@cescoffier
Copy link
Member Author

Furthermore, I assume there will no readiness and liveness probes

Not HTTP (on the main HTTP interface) ones.

@geoand geoand self-assigned this Aug 24, 2021
geoand added a commit to geoand/quarkus that referenced this issue Aug 24, 2021
geoand added a commit that referenced this issue Aug 24, 2021
Lift restriction of HTTP application for Kubernetes manifest generation
@quarkus-bot quarkus-bot bot added this to the 2.3 - main milestone Aug 24, 2021
@gsmet gsmet modified the milestones: 2.3 - main, 2.2.0.Final Aug 24, 2021
gsmet pushed a commit to gsmet/quarkus that referenced this issue Aug 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/kubernetes kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants