Fix docker stack services command Port output#943
Merged
thaJeztah merged 1 commit intodocker:masterfrom Mar 26, 2018
Merged
Conversation
vdemeester
approved these changes
Mar 13, 2018
| return apiv1.Service{}, false | ||
| } | ||
|
|
||
| func makeServiceEndpoint(service apiv1.Service, publishMode swarm.PortConfigPublishMode) swarm.Endpoint { |
Collaborator
There was a problem hiding this comment.
nit: s/makeServiceEndpoint/serviceEndoint ? 😛
22903e0 to
1615089
Compare
Codecov Report
@@ Coverage Diff @@
## master #943 +/- ##
==========================================
+ Coverage 53.92% 54.22% +0.29%
==========================================
Files 262 262
Lines 16604 16610 +6
==========================================
+ Hits 8954 9007 +53
+ Misses 7049 7001 -48
- Partials 601 602 +1 |
…ice is a LoadBalancer or a NodePort * added tests on Kubernetes service conversion to swarm service Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
1615089 to
b816bde
Compare
thaJeztah
reviewed
Mar 23, 2018
|
|
||
| const ( | ||
| publishedServiceSuffix = "-published" | ||
| publishedOnRandomPortSuffix = "-random-ports" |
Member
There was a problem hiding this comment.
nit: There was some discussion around naming of this; as they're not fully "random", but "selected from an ephemeral range"
Contributor
Author
There was a problem hiding this comment.
Ok, good to know, but unfortunately these names are defined in the already shipped compose controller...
Member
There was a problem hiding this comment.
Yeah, probably not a big issue, it's just that they are not really "random" (could be sequential), so "ephemeral" is possibly a better description.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
- What I did
A previous fix on the Kubernetes Compose Controller created two services when ports are exposed, one headless (its type is ClusterIP) and another with the exposed port (its type is LoadBalancer). The
servicescommand wasn't looking at the right place for the exposed ports, so now it prints the exposed ports defined in the LoadBalancer service.- How I did it
I identify the corresponding LoadBalancer service, suffixed by "-published" in its name.
- How to verify it
Deploy a stack with an exposed port:
Before the fix:
After the fix:
- Description for the changelog
Fix
docker stack servicesPORTS column on Kubernetes.- A picture of a cute animal (not mandatory but encouraged)
