Open ggnaegi opened 2 days ago
Adding an extra check for the DNS name could be a solution, providing some logic to protect Ocelot from careless DevOps engineers who might write whatever they want in the configs (in nodes). 😃 Gui, please note that an additional DNS probe for the node hostname will add 100+ milliseconds or even seconds to the request processing time, but we can cache the IP. But we could propose Boolean switcher of cache and entire DNS probe.
@raman-m you right, I think we should foresee an option for that matter
Expected Behavior / New Feature
The consul service discovery provider should check if the node.Name could be a DNS/Host Name, otherwise return the service url.
Actual Behavior / Motivation for New Feature
The consul service provider doesn't check if the node.Name is a host name. Depending on service discovery configuration, the node.Name might not be a host name.
https://developer.hashicorp.com/consul/docs/agent
Node name: This is a unique name for the agent. By default, this is the hostname of the machine, but you may customize it using the -node flag.
Steps to Reproduce the Problem
related to: https://github.com/ThreeMammals/Ocelot/issues/2203, https://github.com/ThreeMammals/Ocelot/issues/954