Hi,
For mysql you can use proxysql as a separate loadbalancer.
But I don't understand your other questions... Does it mean that you want to run haproxy for some service (for example mariadb ..if proxysql is not used) in a mariadb container ? Or have a separate haproxy_mariadb container to do this ?
If yes , both are bad ideas.
First option contradicts the idea of "one process per container".
The Second option will just run multiple instances of haproxy containers.
Could you please explain in detail ?
Thanks,
kevko