Consul Catalog - Multi DC
Can traefik get containers from more than one datacenter on Consul? We use consul to manage applications of our 3 datacenters.
it's only looking at the dc of the local agent. making the dc configurable would be trivial. supporting multiple dcs at once is a bit hairy. ideally traefik core would be able to multiplex the same provider with different configs.
btw my setup has a traefik for each dc that is also configured with its own domain.
You may be able to implement that by allowing traefik to use prepared queries instead of the service Api. Check the last sample in the above link. The user would have to give to traefik the prepared query he made in consul.
if its a duplicate, then how to handle queries instead of services?
Any updates here?
Would like to see this also. A nice use case would be to have a percentage of traffic be sent to the other consul data center service.
This would be great. It could really come in handy when trying to hit a local service if available, but fail over to instances in another data center if necessary.
Also a nod from me this would be helpful in our cloud/on prem hybrid setups
When I define a resolver configuration entry to fail over the service to a different datacenter, it works great with the consul ingress gateway, but doesn't work with Traefik. :/
Will this feature be implemented ?
I'd be happy to look into creating a pull request for this, given a small bit of guidance. Adding prepared query support shouldn't be all that difficult, but where to put the integration in Traefik is in question. It isn't part of "Consul Catalog", but it does feel closely related and would essentially perform all of the same functions as the Catalog provider, just via different API calls to get the services. Should this be a wholly separate provider or should it be an addition to the Catalog provider? My feeling is that we could apply all of the same configuration to both catalog and prepared query lookups and simply combine the results, but im open to suggestions.
Any update on this?