Consul Catalog routing via static configuration

I have numerous entrypoints (tcp, udp and https(s)) and services from consul catalog routed via tags, all working fine.

Now I have a service in Consul that is provided by a vendored software, where I have no control over the tag values. In this case, it is a database service where each instance has either the tag active or replica. I'd like to have a TCP router for a specific entrypoint to this service.

Without any traefik-specific tags on the service, Traefik automatically creates HTTP services and routers. Can I override thisspecific service via static configuration (or COnsul KV) in any way? The "labels" mentioned in https://docs.traefik.io/reference/dynamic-configuration/consul-catalog/ seem to be ignored when specified in the configuration file and only picked up via tags on the Consul services.

Is there any way I can do what I want, or do I need to spin up a secondary traefik instance only for this use-case?

Can you describe what you mean by "override this specific service via static configuration"? Override in which way? Can you give an example?

Update: sorry, I did not notice " I'd like to have a TCP router for a specific entrypoint to this service." It makes sense.

I personally never used consul catalog, but I wonder can you do what you want by providing configuration via File Provider instead for that?

So let's say for example I have a consul service foo with two instances, one with tag bar and one with tag baz.

I have a configured endpoint in traefik:

[entrypoints.foo]
address = "192.168.1.2:1337

I'd like to route the foo endpoint to the foo service, iff the service instance has the bar tag set.

I understand I can use constraints (which are global so a bit cumbersome, but should be possible) to limit which instance gets routed.

However, I see no way of avoiding Traefik routing this as a HTTP service rather than TCP without using service tags.

That's pretty much what I'm trying to achieve actually, but after quite a bit of trial and error I still can't get Traefik to recognize my Consul service through the file provider - it's still gets designated as HTTP

Are you saying you create a [tcp.routers] but you believe that http router is being created instead?

Yes, even though I'm referencing the consul service by name. Verified this through the web dashboard.

I just ended up solving this for myself by forking the software producing the service and hardcoding the traefik tags there - but I'm sure this is not an all-to-uncommon use-case for others.

Yes, even though I'm referencing the consul service by name. Verified this through the web dashboard.

Are you specifying provider name?