On Wed, Sep 30, 2020 at 9:39 AM Jonathan Dowland <jdowl...@redhat.com>
wrote:

> Hello there,
>
> I've got a proof-of-concept of an S2I-enabled Java application source
> that injects a Java "agent" into the resulting build images[1]. (A Java
> agent is some code that is loaded into the runtime environment and
> executed but is otherwise tangential to the application)
>
> The agent listens on a configurable TCP port. In order for this to be
> accessed within the cluster (or without), the image output from the
> build would need that port opened. (I think!)
>
> I am no expert but I believe this is not possible with the S2I build
> strategy. It might be possible with the Docker build strategy
> (by defining additional LISTEN instructions). Can anyone confirm my
> suspicion?
>

do you mean EXPOSE instructions?


>
> Part of my uncertainty is whether the containers within OpenShift need
> open-port information at the container image level, Docker-style, at
> all, or whether this is superceded by OpenShift-level concepts (Routes
> etc.)
>

Openshift does not need the explicit directive at the image level.  You can
tell openshift to route traffic to any port on a pod/container that you
want, regardless of what the image explicitly declares.  So you should be
fine to do what you are trying to do.




>
> [1]
> https://github.com/jmtd/quarkus-quickstarts/commit/7f9e866aa0dab735ec8d7397f78b40cad46745b5
>
>
>
> Many thanks,
>
> --
> 👱🏻 Jonathan Dowland <jdowl...@redhat.com>
> Senior Software Engineer, OpenJDK, Red Hat
>
> _______________________________________________
> users mailing list
> users@lists.openshift.redhat.com
> http://lists.openshift.redhat.com/openshiftmm/listinfo/users
>


-- 
Ben Parees | OpenShift
_______________________________________________
users mailing list
users@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users

Reply via email to