-
Notifications
You must be signed in to change notification settings - Fork 188
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
Add a "defaultPortMapping" option which exposes all Mesos provided ports #1036
Add a "defaultPortMapping" option which exposes all Mesos provided ports #1036
Conversation
@@ -239,6 +239,14 @@ private void prepareContainerInfo(final Offer offer, final SingularityTaskId tas | |||
dockerInfoBuilder.addPortMappings(maybePortMapping.get()); | |||
} | |||
} | |||
} else if (configuration.getNetworkConfiguration().isDefaultPortMapping() && dockerInfo.get().getPortMappings().isEmpty() && ports.isPresent()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might also need to check that network mode is BRIDGE
here, if it's HOST
or NONE
and you specify mappings believe that will end up at least in a TASK_FAILED
if not a TASK_ERROR
. Other than that looks good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
Tested this in our staging infra and looks good 👍 |
Test failure looks transient, timed out on the openjdk7 build. |
LGTM |
Our apps generally ask for 1 or 2 ports. It's a pain to repeatedly write
so why not just let Singularity fill it in for you?