hashicorp / hashicorp/consul

connect: configure envoy as dynamic forward proxy

Open
#6,736 1 comment 0 reactions 0 assignees View on GitHub
theme/connect theme/envoy/xds type/question
Dominant language
Go
Stars
30.1k
Forks
4.6k
Avg merge
2d 6h
Merged PRs (30d)
43

Description

We'd like to setup envoy as [dynamic forward proxy](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/http/http_proxy#http-dynamic-forward-proxy) with consul's [escape hatch feature](https://www.consul.io/docs/connect/proxies/envoy.html#advanced-configuration).

While the [example](https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/dynamic_forward_proxy_filter#config-http-filters-dynamic-forward-proxy) from the docs provided as yaml/json to envoy at startup worked pretty well, we couldn't manage to get it running with consul, seeing errors like

```txt
[2019-11-01 10:32:36.606][1][warning][config] [bazel-out/k8-opt/bin/source/common/config/_virtual_includes/grpc_stream_lib/common/config/grpc_stream.h:91] gRPC config stream closed: 2,
can't unmarshal Any nested proto *v2.Cluster: unknown value "CLUSTER_PROVIDED" for enum envoy.api.v2.Cluster_LbPolicy
```
Replacing `CLUSTER_PROVIDED` with `6` brought another error

```txt
[2019-11-01 10:34:20.004][1][warning][config] [bazel-out/k8-opt/bin/source/common/config/_virtual_includes/grpc_stream_lib/common/config/grpc_stream.h:91] gRPC config stream closed: 2,
can't unmarshal Any nested proto *v2.Cluster: unknown message type "envoy.config.cluster.dynamic_forward_proxy.v2alpha.ClusterConfig"
```

That's our consul service registration
```txt
service {
name = "journal"
address = "192.168.144.9"
port = 8888
connect {
sidecar_service {
proxy {
upstreams {
destination_name = "dynamic_forward_proxy_cluster"
local_bind_port = 22222
config {
envoy_cluster_json = <

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.