{"id":13651185,"url":"https://github.com/jippi/consul-envoy","last_synced_at":"2025-04-22T22:30:36.512Z","repository":{"id":151755572,"uuid":"108719491","full_name":"jippi/consul-envoy","owner":"jippi","description":"Consul to Envoy API listener","archived":true,"fork":false,"pushed_at":"2018-05-02T13:00:40.000Z","size":58,"stargazers_count":35,"open_issues_count":2,"forks_count":9,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-11-10T02:34:04.633Z","etag":null,"topics":["consul","envoy","hashicorp","hashicorp-consul","routing"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jippi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-10-29T09:03:54.000Z","updated_at":"2024-06-03T00:49:50.000Z","dependencies_parsed_at":"2023-04-08T15:30:43.067Z","dependency_job_id":null,"html_url":"https://github.com/jippi/consul-envoy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jippi%2Fconsul-envoy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jippi%2Fconsul-envoy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jippi%2Fconsul-envoy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jippi%2Fconsul-envoy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jippi","download_url":"https://codeload.github.com/jippi/consul-envoy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250333863,"owners_count":21413471,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["consul","envoy","hashicorp","hashicorp-consul","routing"],"created_at":"2024-08-02T02:00:46.184Z","updated_at":"2025-04-22T22:30:36.241Z","avatar_url":"https://github.com/jippi.png","language":"Go","funding_links":[],"categories":["Projects"],"sub_categories":["Load Balancing"],"readme":"## About consul-envoy\n\nThis project aim to be a quick'n'dirty way to get Envoy and Consul talking nicely, so any Consul service URL can be routed through evnoy.\n\nThe current code allows to route `*.service.consul` to the backends availble in the Consul catalog\n\nCurrently [`RDS - Route discovery service`](https://www.envoyproxy.io/envoy/configuration/http_conn_man/rds), [`SDS - Service discovery service`](https://www.envoyproxy.io/envoy/configuration/cluster_manager/sds_api) and [`CDS - Cluster discovery service`](https://www.envoyproxy.io/envoy/configuration/cluster_manager/cds) is implemented\n\n### Project goal\n\nMaking using Envoy with Consul as easy as [fabio](https://github.com/fabiolb/fabio) and [traefik](https://github.com/containous/traefik), possible exposting additional configuration to envoy through Consul Service tags (similar to fabio `urlprefix-*` configuration).\n\n### Configuration\n\n- `PORT` (env) - the HTTP port to listen on (example: `8877`)\n- `CONSUL_*` (env) - the default Consul environment variables is used when connecting to the Consul cluster. (e.g. `CONSUL_HTTP_ADDR`)\n\n### Building\n\n`make requirements` to install Go Vendor and fetch dependencies\n`make install` to build the binary (`consul-envoy`) into `${GOPATH}/bin`\n`make dist` to build platform specific binary into `./build/consul-enovy-${OS}-${ARCH}`\n\n### Example envoy config\n\nThe configuration assume that this project is named `envoy-consul` in the Consul catalog and listens on port `8877`\n\n```json\n{\n    \"listeners\": [\n        {\n            \"address\": \"tcp://0.0.0.0:80\",\n            \"filters\": [\n                {\n                    \"name\": \"http_connection_manager\",\n                    \"config\": {\n                        \"codec_type\": \"auto\",\n                        \"stat_prefix\": \"http\",\n                        \"use_remote_address\": true,\n                        \"rds\": {\n                            \"route_config_name\": \"default\",\n                            \"refresh_delay_ms\": 10000,\n                            \"cluster\": \"rds_http\"\n                        },\n                        \"filters\": [\n                            {\n                                \"name\": \"router\",\n                                \"config\": {}\n                            }\n                        ]\n                    }\n                }\n            ]\n        },\n    ],\n    \"admin\": {\n        \"access_log_path\": \"/dev/null\",\n        \"address\": \"tcp://0.0.0.0:8001\"\n    },\n    \"cluster_manager\": {\n        \"cds\": {\n            \"cluster\": {\n                \"name\": \"cds\",\n                \"type\": \"logical_dns\",\n                \"lb_type\": \"round_robin\",\n                \"connect_timeout_ms\": 1000,\n                \"hosts\": [\n                    {\n                        \"url\": \"tcp://consul-envoy.service.consul:8877\"\n                    }\n                ]\n            }\n        },\n        \"sds\": {\n            \"refresh_delay_ms\": 5000,\n            \"cluster\": {\n                \"name\": \"sds\",\n                \"type\": \"logical_dns\",\n                \"lb_type\": \"round_robin\",\n                \"connect_timeout_ms\": 1000,\n                \"hosts\": [\n                    {\n                        \"url\": \"tcp://consul-envoy.service.consul:8877\"\n                    }\n                ]\n            }\n        },\n        \"clusters\": [\n            {\n                \"name\": \"rds_http\",\n                \"type\": \"logical_dns\",\n                \"lb_type\": \"round_robin\",\n                \"connect_timeout_ms\": 1000,\n                \"hosts\": [\n                    {\n                        \"url\": \"tcp://consul-envoy.service.consul:8877\"\n                    }\n                ]\n            }\n        ]\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjippi%2Fconsul-envoy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjippi%2Fconsul-envoy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjippi%2Fconsul-envoy/lists"}