Service aliases#660
Open
pelletier wants to merge 1 commit intogliderlabs:masterfrom
Open
Conversation
This commit makes it possible for a given container to advertise multiple services using aliases. For example, the following config: ``` SERVICE_NAME=a SERVICE_ALIASES=b,c ``` will result in 3 services being registered: a, b, and c. All three pointing to the same container. Those changes should be compatible with ports, and tags.
Author
|
@josegonzalez any chance we could get some feedback on this please? :) |
sodabrew
reviewed
Jan 9, 2021
| id := mapDefault(metadata, "id", "") | ||
| if id != "" { | ||
| service.ID = id | ||
| service.Attrs = metadata |
There was a problem hiding this comment.
This looks like a subtle difference, by assigning the service.Attrs = metadata here means that the metadata still contains the id, tags, name fields? Note that in the original code, there are three calls to delete(metadata, ...) to remove those fields before assigning service.Attrs = metadata. Is this any cause for concern or change in registration behavior?
There was a problem hiding this comment.
(I realize it's been almost two years since this PR was posted, and I doubt there will be any further activity on this project, but this PR solves a problem I was just researching in how to coordinate a service name transition period!)
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.

This commit makes it possible for a given container to advertise
multiple services using aliases.
For example, the following config:
will result in 3 services being registered: a, b, and c. All three
pointing to the same container.
Those changes should be compatible with ports, and tags.
This should fix #328