I'm in the process of migrating to Consul and I was wondering what was the correct approach for this scenario:
The possible ways:
prod.myservice.service.consul){{range service "myservice"}}
{{if .Tags.Contains("prod") }}
{{.Address}}
{{end}}
{{end}}
myservice-prod-i4252I know DCs are not replicated out of the box but I'm assuming it should not matter in that case.
On side note, would the following find prod nodes AND prod nodes tagged master ? (the "or" at the beginning is confusing me)
{{range service "myservice"}}
{{if or (.Tags.Contains "prod") (.Tags.Contains "master") }}
{{.Address}}
{{end}}
{{end}}Any insight would be welcomed, thanks in advance.