-
Notifications
You must be signed in to change notification settings - Fork 2k
Fix docker stack services command Port output #943
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 docker stack services command Port output #943
Conversation
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.
LGTM 🐯
| return apiv1.Service{}, false | ||
| } | ||
|
|
||
| func makeServiceEndpoint(service apiv1.Service, publishMode swarm.PortConfigPublishMode) swarm.Endpoint { |
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.
nit: s/makeServiceEndpoint/serviceEndoint ? 😛
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
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
|
|
||
| const ( | ||
| publishedServiceSuffix = "-published" | ||
| publishedOnRandomPortSuffix = "-random-ports" |
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.
nit: There was some discussion around naming of this; as they're not fully "random", but "selected from an ephemeral range"
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.
Ok, good to know, but unfortunately these names are defined in the already shipped compose controller...
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.
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.
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.
LGTM, thanks!

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

- 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)
