On Thursday, July 20, 2017 8:49:19 AM UTC Mark Petrovic wrote:
> > I see. It *sounds *like at runtime an exposed port is associated
> > effectively with an image (aka *app?*), not a pod. Is that fair to say?
I don't completely agree. This is just about the pod runtime being able to
match at runtime port to a port exposed by some app in the pod. Ports are in
the pod scope but names (from app side) are arbitrary, and they are used to
link the two entities.
What you wanted to do is perfectly fine in the pod model, just not with docker
images as you have two apps claiming the same exposed-port identifier after
the auto-conversion.
> > Do you feel like what I want to achieve is reasonable? If yes to both
> > those questions, how entangled in the design of rkt is that association,
> > and therefore how difficult, through code changes, would it be to allow
> > what I am attempting?
I think this won't fix your problem anyway, as you can't have two exposed-
ports in different apps identified by the same name (per appc pod definition).
> It's also possible, maybe likely, that what I'm attempting is an
> anti-pattern. I can separate the two containers into dedicated pods and
> still elegantly achieve my goals. How I got here resulted from noting that
> I *can* run two containers in the same pod, and that drove the remainder of
> my config. Because I can run two containers in a pod doesn't mean I should
> run two containers in a pod for my specific use case. But, my original
> question about why that doesn't work in conjunction with the exposed ports
> might help someone reading this in the future.
It depends on your usecase. It should be ok to assemble the two in a pod if
their lifetime is strictly linked (i.e. they should start, stop, restart, and
fail together) and their are part of the same architectural service; otherwise
they can probably be split and handled as two entities.