-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
API: Autofill Service.Address with Node.Address if Service.Address is empty #4599
Comments
This would be good!
|
I agree with you on the initial issue, but I think that many tools are now doing assumptions based on this value being present or not, see my comment: #7782 (comment) I wonder if correct fix would not be to provide such wrappers in consul-template or various SDKs (and describe what should be the correct implementation). Note that is also applies for instance to Check(s) status(es) for Health endpoint, see the helpers we added in our templating system (service_address, status, current_weight...): https://github.com/criteo/consul-templaterb/blob/master/TemplateAPI.md#helpers |
I'm late to this issue but... what tools would these be, and why would they care about it being empty ( |
Hello All! Apologies for the long tail. We closed #7782 based on internal discussion. There are docs updates that can be performed that can better clear this ambiguity. There is, however, a potential need for a new API to properly service both the service discovery and service management use cases and it will require a more holistic look at our API to determine what needs to be done. There'll be a follow up to this message with a bit more on that once a solution has been considered. In the meantime, to clear the ambiguity:
|
Feature Description
Whenever the Consul API reports a
ServiceAddress
orService.Address
, if this value is blank/empty, default to the address of the Node instead of leaving the value blank.We currently document that a blank value is expected behaviour in the catalog endpoint documentation, although changing this could improve DX and is therefore a feature request.
https://www.consul.io/api/catalog.html#serviceaddress
Use Case(s)
Make it easier for API consumers/clients to retrieve the IP address of a service, even when there is no need for the registration of the service to provide an IP.
Also see:
hashicorp/consul-template#587 (comment)
#4579
@mkeeler this is re: offline chat
The text was updated successfully, but these errors were encountered: