registrator
registrator copied to clipboard
Feature #630 basic service mesh support for Consul
This PR is trying to implement #630.
Consul ServiceMesh Support
Consul can support ServiceMesh by integrating with proxies like Envoy, the most convenient way to enable this capability is creating a Service like this:
{
"service": {
"name": "web",
"port": 8080,
"connect": { "sidecar_service": {} }
}
}
Then Consul will automatically generate a corresponding SidecarService with default configurations.
In Registrator, you may add the "connect": { "sidecar_service": {} }
configuration by the -service-mesh
flag. It's also overridable by SERVICE_MESH
.
Your feedbacks are appreciated.
@evisong if I understand correctly, -service-mesh
and SERVICE_MESH
are both representing the same boolean? also is the SERVICE_MESH
variable specific to registrator or the container? If it is specific to containers, it would be nice to have a default value of connect": { "sidecar_service": {} }
but can be overridden to add upstreams. Most of our containers do not need a sidecar and if they do, they may or may not have upstreams. If there's another way to add upstreams, let us know. Appreciate your work.
if I understand correctly,
-service-mesh
andSERVICE_MESH
are both representing the same boolean? also is theSERVICE_MESH
variable specific to registrator or the container? If it is specific to containers, it would be nice to have a default value ofconnect": { "sidecar_service": {} }
but can be overridden to add upstreams. Most of our containers do not need a sidecar and if they do, they may or may not have upstreams. If there's another way to add upstreams, let us know. Appreciate your work.
@vilva42 Sorry for the super-late response. Could you please elaborate on the expected format of upstream configurations? Btw, my dev environment is not available right now, please expect another late response 😢
hey @evisong Thanks for the response. We decided not to use registrator for this use case.