-
Notifications
You must be signed in to change notification settings - Fork 910
Fix multiple ports named service #194
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 multiple ports named service #194
Conversation
…s exposed would cause services to overwrite each other
|
Hmmm. I actually prefer the current behavior since I can get to my service via the a single directory, then get the specific ports via keys and values. |
|
@cgswong but they're different ports and therefore different services. esp when working with clients that use discovery to connect, you don't want to get a list of addresses/ports that speak different protocols. @aburnett am i correct in the workaround to this being to specify specific service names for each port? |
|
By default in If I want to call my cluster service on port 9300 something specific I can do |
|
You're saying that the default behavior using I think if you really want to centralize them, you should go out of your way to name them the same, eg |
|
Correct, the different behavior between the two scenarios was what I found confusing and prompted the patch. |
|
So this is the right thing, but it will break expectations for some people. Can you add an entry to the CHANGELOG file? Also if you can update the relevant docs if necessary that would be super awesome. |
|
Updated. |
|
Thanks! |
…rvice Fix multiple ports named service
|
The command below: should register the services "http" and "https" in Consul (according to the doc). Instead (since this commit in master I suppose), i see the services with names "http-80" and "https-443". Looks like |
|
I have experienced the same behaviour as @ptklechat |
|
Seems worth a revert for now perhaps? |
|
I would much prefer to take a fix. Even if it is a PR to revert. |
|
@JohnyDays I don't think so, SERVICE_NAME and SERVICE_80_NAME will both cause the metadata to contain 'name' I believe. |
|
In this scope it is already only the port's metadata |
|
Tried it out in my fork, it did the job. The full change was |
|
If you can submit a PR, please ask others to try it first to get some confirmations. Thanks for looking into it. |
|
@JohnyDays I tried that, but that gets us back to square one where only specifying a |
|
It didn't do that for me, but the fork i tried it on is a bit different (not much though) |
|
Can you checkout the changes I just made in #245? |
|
This has disappeared into a hole.. What do we have to do to get it moving again? Frustrated that I need one of the features from master which isnt in v6, but I cant take it because of this which completely wrecks the ability for me to control my service names. There's been a few PRs about this, what need to happen for this to be either reverted, or sorted so that we still have the option to name services what we want to? Happy to help out, what do you need @progrium ? |
If a container exposed multiple ports and a SERVICE_NAME was specified the backend would end up with both exposed ports under the same service.
would result in
With this patch we now get