Connect identical instances of a service to each other using service mesh

Hi all and marry Christmas

I have different instances of a Postgres service and they need to communicate with each other for leader election and I want it to be through service mesh. One way is to manually add an upstream per instance for each sidecar, which doesn’t seem a very clean approach and I prefer not to do so. another problem with this approach is if I want to add a new instance, I need to manually change all other upstreams too.
Is there any better way to do so?