You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a number of microservices across multiple datacenters and I want nginx to route to the containers running those services, I can have 3 of service X running on DC Y and 8 of service X running on DC Z.
Currently iterating through service@dc will generate duplicate entries for services in the configuration. If toJSON were to work on all call as it does for map[string]interface {} service deduplication and more complex manipulations could be handled by a plugin.
The text was updated successfully, but these errors were encountered:
Thank you for opening this issue. I've had some time to think about this, and I do not think Consul Template should permit manipulation of service(s) entries. This has not been a widely-requested feature, and I think the issues are you are encountering are a result of the way you have structured your data in Consul, and not necessarily a problem with Consul Template.
In general, each data center should be a self-contained representation. Cross-communication between data centers should be done at a higher level. For example, each microservice within in a data center should be fronted by a load balancer for that data center. This provides a single entry point for the microservice in the DC. If you would like to balance across multiple DCs, you would query for the single load balancer service in each data center instead of trying to munge all of the microservices into one template. This allows for a finer-grained control over on a per-DC basis.
This is related to #434
Use case:
I have a number of microservices across multiple datacenters and I want nginx to route to the containers running those services, I can have 3 of service X running on DC Y and 8 of service X running on DC Z.
Currently iterating through service@dc will generate duplicate entries for services in the configuration. If toJSON were to work on all call as it does for
map[string]interface {}
service deduplication and more complex manipulations could be handled by a plugin.The text was updated successfully, but these errors were encountered: