registrator icon indicating copy to clipboard operation
registrator copied to clipboard

Feature #630 basic service mesh support for Consul

Open evisong opened this issue 5 years ago • 3 comments

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 avatar Jul 21 '19 13:07 evisong

@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.

vilva42 avatar Dec 12 '19 17:12 vilva42

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.

@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 😢

evisong avatar Jun 28 '20 03:06 evisong

hey @evisong Thanks for the response. We decided not to use registrator for this use case.

vilva42 avatar Jun 28 '20 19:06 vilva42