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

Fix presentation of published "random" host ports #404

Merged
merged 1 commit into from Aug 1, 2017

Conversation

Projects
None yet
5 participants
@thaJeztah
Member

thaJeztah commented Jul 31, 2017

fixes #402

Ports that were picked from the ephemeral port range were presented as *:0->80/tcp.

This patch changes the presentation to use the actually assigned port, instead of the port specified in Endpoint.Spec (which is always empty/zero (0))

Before this change;

ID                  NAME                MODE                REPLICAS            IMAGE               PORTS
5d44i665qj66        with-random-port    replicated          1/1                 nginx:alpine        *:0->80/tcp

After this change;

ID                  NAME                MODE                REPLICAS            IMAGE               PORTS
5d44i665qj66        with-random-port    replicated          1/1                 nginx:alpine        *:30000->80/tcp
Fix presentation of published "random" host ports
Ports that were picked from the ephemeral port range
were presented as `*:0->80/tcp`.

This patch changes the presentation to use the
actually assigned port, instead of the port specified
in `Endpoint.Spec` (which is always empty/zero (`0`))

Before this change;

    ID                  NAME                MODE                REPLICAS            IMAGE               PORTS
    5d44i665qj66        with-random-port    replicated          1/1                 nginx:alpine        *:0->80/tcp

After this change;

    ID                  NAME                MODE                REPLICAS            IMAGE               PORTS
    5d44i665qj66        with-random-port    replicated          1/1                 nginx:alpine        *:30000->80/tcp

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

@thaJeztah thaJeztah requested review from dnephin and vdemeester as code owners Aug 1, 2017

@codecov-io

This comment has been minimized.

Show comment
Hide comment
@codecov-io

codecov-io Aug 1, 2017

Codecov Report

Merging #404 into master will not change coverage.
The diff coverage is 50%.

@@          Coverage Diff           @@
##           master    #404   +/-   ##
======================================
  Coverage    46.2%   46.2%           
======================================
  Files         193     193           
  Lines       16092   16092           
======================================
  Hits         7435    7435           
  Misses       8270    8270           
  Partials      387     387

codecov-io commented Aug 1, 2017

Codecov Report

Merging #404 into master will not change coverage.
The diff coverage is 50%.

@@          Coverage Diff           @@
##           master    #404   +/-   ##
======================================
  Coverage    46.2%   46.2%           
======================================
  Files         193     193           
  Lines       16092   16092           
======================================
  Hits         7435    7435           
  Misses       8270    8270           
  Partials      387     387
@dnephin

dnephin approved these changes Aug 1, 2017

LGTM

@vdemeester

LGTM 🐸

@vdemeester vdemeester merged commit 772956b into docker:master Aug 1, 2017

8 checks passed

ci/circleci: cross Your tests passed on CircleCI!
Details
ci/circleci: lint Your tests passed on CircleCI!
Details
ci/circleci: shellcheck Your tests passed on CircleCI!
Details
ci/circleci: test Your tests passed on CircleCI!
Details
ci/circleci: validate Your tests passed on CircleCI!
Details
codecov/patch 50% of diff hit (target 50%)
Details
codecov/project 46.2% (+0%) compared to c6e497d
Details
dco-signed All commits are signed

@GordonTheTurtle GordonTheTurtle added this to the 17.08.0 milestone Aug 1, 2017

@thaJeztah thaJeztah deleted the thaJeztah:fix-port-presentation branch Aug 1, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment