spring-cloud / spring-cloud-deployer-kubernetes

The Spring Cloud Deployer implementation for Kubernetes
Apache License 2.0
157 stars 97 forks source link

Available entrypointStyle options not working with OpenShift-certified Java images #496

Open aritzbastida opened 2 years ago

aritzbastida commented 2 years ago

We are trying to deploy Spring Cloud Data Flow in OpenShift 4, which is a Kubernetes-certified platform. However, we found out that, currently, none of the entrypoint styles available work with our Java images created with Red Hat S2I (Source-to-Image).

Specifically, we are using the ubi8/openjdk-17 builder image. As you can see in the following excerpt, there is a default CMD instruction in the Dockerfile, but no ENTRYPOINT.

  ...
  # Define the working directory
  WORKDIR /home/jboss
  # Define run cmd
  CMD ["/usr/local/s2i/run"]
  ADD help.md /
## /
## END target image

Let's now review the problems we have with the entrypoint styles:

As a workaround, we suggest:

We made local modifications in the source code, and now can start our Java image with any of the 3 styles. If you wish, we can contribute the changes with a PR, for you to review.

markpollack commented 1 year ago

Please do make the PR, sounds like it would be a great contribution.