-
Notifications
You must be signed in to change notification settings - Fork 914
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
Service aliases #660
base: master
Are you sure you want to change the base?
Service aliases #660
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.
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.
@josegonzalez any chance we could get some feedback on this please? :) |
id := mapDefault(metadata, "id", "") | ||
if id != "" { | ||
service.ID = id | ||
service.Attrs = metadata |
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(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 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