Hi,
We are trying to use the envoy_local_cluster_json escape hatch in consul proxy defaults. Consul is not setting circuit breaker on the local_app cluster, so we need to override the envoy_local_cluster_json.
We are using the proxy defaults CRD with the following manifest:
apiVersion: consul.hashicorp.com/v1alpha1
kind: ProxyDefaults
metadata:
name: global
namespace: consul
spec:
config:
envoy_local_cluster_json: "{\"@type\":\"type.googleapis.com/envoy.config.cluster.v3.Cluster\",\"name\":\"local_app\",\"type\":\"STATIC\",\"connect_timeout\":\"5s\",\"circuit_breakers\":{\"thresholds\":[{\"max_connections\":10000000,\"max_pending_requests\":10000000,\"max_requests\":10000000}]},\"load_assignment\":{\"cluster_name\":\"local_app\",\"endpoints\":[{\"lb_endpoints\":[{\"endpoint\":{\"address\":{\"socket_address\":{\"address\":\"127.0.0.1\",\"port_value\":{{ .ServicePort }}}}}}]}]}}\n"
transparentProxy:
dialedDirectly: false
Note the {{ .ServicePort }}, we are trying to use go templates to have a dynamic service port as it was done in this issue: Consul connect configure envoy circuit breakers · Issue #7211 · hashicorp/consul · GitHub
However, the above is not working and envoy does not generate a local_app cluster. Is this only possible with HCL or am I doing something wrong?