Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

consul connect ignores envoy_listener_json & envoy_cluster_json in proxy.upstream[].config #6377

Closed
skyrocknroll opened this issue Aug 22, 2019 · 3 comments
Milestone

Comments

@skyrocknroll
Copy link

skyrocknroll commented Aug 22, 2019

Consul Version : Consul v1.6.0-beta3 (5ff04a3)
os : ubuntu 18.04

curl -v -XGET http://172.31.16.18:8500/v1/agent/service/240ba83a698d-sidecar-proxy | jq

{
  "Kind": "connect-proxy",
  "ID": "240ba83a698d-sidecar-proxy",
  "Service": "goserver-t-sidecar-proxy",
  "Tags": [
    "sidecar"
  ],
  "Meta": null,
  "Port": 27582,
  "Address": "",
  "Weights": {
    "Passing": 1,
    "Warning": 1
  },
  "EnableTagOverride": false,
  "ContentHash": "f063b057025d8ccd",
  "Proxy": {
    "DestinationServiceName": "goserver-t",
    "DestinationServiceID": "_nomad-task-7aa5e8d7-d529-acb1-f0b7-146e64d0e5d1-goserver-t-goserver-t",
    "Config": {
      "envoy_extra_stats_sinks_json": "{\n        \"name\": \"envoy.dog_statsd\",\n\t\t\"config\" : {\n\t\t\t\"address\" : {\n\t\t\t\t\"socket_address\" : \n\t\t\t\t\t{\n\t\t\t\t\t\t\"protocol\" : \"UDP\",\n\t\t\t\t\t\t\"port_value\" : 8125,\n\t\t\t\t\t\t\"address\" : \"172.31.20.6\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n\t}\n",
      "envoy_local_cluster_json": "{\n\t\t\t  \"name\": \"inbound\",\n\t\t\t  \"type\": \"STATIC\",\n\t\t\t  \"connect_timeout\": \"90s\",\n\t\t\t  \n\t\t\t  \"lb_policy\": \"ROUND_ROBIN\",\n\t\t\t  \"load_assignment\": {\n\t\t\t\t\"cluster_name\": \"inbound\",\n\t\t\t\t\"endpoints\": [\n\t\t\t\t  {\n\t\t\t\t\t\"lb_endpoints\": [\n\t\t\t\t\t  {\n\t\t\t\t\t\t\"endpoint\": {\n\t\t\t\t\t\t  \"address\": {\n\t\t\t\t\t\t\t\"socket_address\": {\n\t\t\t\t\t\t\t  \"address\": \"127.0.0.1\",\n\t\t\t\t\t\t\t  \"port_value\": \"8181\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t  }\n\t\t\t\t\t\t}\n\t\t\t\t\t  }\n\t\t\t\t\t]\n\t\t\t\t  }\n\t\t\t\t]\n\t\t\t  },\n\t\t\t  \"circuit_breakers\": {\n\t\t\t\t\"thresholds\": [\n\t\t\t\t  {\n\t\t\t\t\t\"priority\": \"DEFAULT\",\n\t\t\t\t\t\"max_connections\": 1024,\n\t\t\t\t\t\"max_pending_requests\": 1024,\n\t\t\t\t\t\"max_requests\": 1024,\n\t\t\t\t\t\"max_retries\": 3\n\t\t\t\t  }\n\t\t\t\t]\n\t\t\t  }\n\t\t\t}",
      "envoy_public_listener_json": "{\n\t\t\t\t\"name\": \"inbound\",\n\t\t\t\t\"address\": {\n\t\t\t\t  \"socket_address\": {\n\t\t\t\t\t\"address\": \"0.0.0.0\",\n\t\t\t\t\t\"port_value\": 27582\n\t\t\t\t  }\n\t\t\t\t},\n\t\t\t\t\"filter_chains\": [\n\t\t\t\t  {\n\t\t\t\t\t\"filters\": [\n\t\t\t\t\t  {\n\t\t\t\t\t\t\"name\": \"envoy.http_connection_manager\",\n\t\t\t\t\t\t\"config\": {\n\t\t\t\t\t\t  \"route_config\": {\n\t\t\t\t\t\t\t\"name\": \"wildcard\",\n\t\t\t\t\t\t\t\"virtual_hosts\": [\n\t\t\t\t\t\t\t  {\n\t\t\t\t\t\t\t\t\"name\": \"backend\",\n\t\t\t\t\t\t\t\t\"routes\": [\n\t\t\t\t\t\t\t\t  {\n\t\t\t\t\t\t\t\t\t\"route\": {\n\t\t\t\t\t\t\t\t\t  \"cluster\": \"inbound\",\n\t\t\t\t\t\t\t\t\t  \"timeout\": \"90s\",\n\t\t\t\t\t\t\t\t\t  \"retry_policy\": {\n\t\t\t\t\t\t\t\t\t\t\t\"retry_on\": \"5xx,connect-failure\",\n\t\t\t\t\t\t\t\t\t\t\t\"num_retries\" : 2,\n\t\t\t\t\t\t\t\t\t\t\t\"per_try_timeout\" : \"60s\"\n\t\t\t\t\t\t\t\t\t  }\n\t\t\t\t\t\t\t\t\t  \n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"match\": {\n\t\t\t\t\t\t\t\t\t  \"prefix\": \"/\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t  }\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\"domains\": [\n\t\t\t\t\t\t\t\t  \"*\"\n\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t  }\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t  },\n\t\t\t\t\t\t  \"tracing\": {\n\t\t\t\t\t\t\t\"random_sampling\": {}\n\t\t\t\t\t\t  },\n\t\t\t\t\t\t  \"http_filters\": [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t  \"name\": \"envoy.router\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t  ],\n\t\t\t\t\t\t  \"stat_prefix\": \"ingress_http\",\n\t\t\t\t\t\t  \"access_log\": {\n\t\t\t\t\t\t\t\"name\": \"envoy.file_access_log\",\n\t\t\t\t\t\t\t\"config\": {\n\t\t\t\t\t\t\t  \"path\": \"/var/log/envoy-access/inbound-goserver-t.log\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t  },\n\t\t\t\t\t\t  \"codec_type\": \"AUTO\"\n\t\t\t\t\t\t}\n\t\t\t\t\t  }\n\t\t\t\t\t]\n\t\t\t\t  }\n\t\t\t\t]\n\t\t\t  }\n\t\t\t",
      "envoy_stats_config_json": "{\n          \"stats_tags\": [\n\t\t\t{\n              \"tag_name\": \"nomad-task-name\",\n              \"fixed_value\": \"goserver-t\"\n            },\n            {\n              \"tag_name\": \"host-machine\",\n              \"fixed_value\": \"<no value>\"\n            },\n            {\n              \"tag_name\": \"team-name\",\n              \"fixed_value\": \"<no value>\"\n            }\n          ]\n        }\n",
      "envoy_stats_flush_interval": "10s"
    },
    "Upstreams": [
      {
        "DestinationType": "service",
        "DestinationName": "hawkeye-service",
        "Config": {
          "envoy_cluster_json": "{\n\t\t\t  \"name\" : \"hawkeye-service\",\n\t\t\t  \"type\": \"EDS\",\n              \"eds_cluster_config\": {\n              \t\"eds_config\": {\n                \t\"ads\": {}\n              \t}\n               },\n\t\t\t  \"connect_timeout\": \"90s\",\n\t\t\t  \"lb_policy\": \"ROUND_ROBIN\",\n  \t\t\t  \n\t\t\t  \"circuit_breakers\": {\n\t\t\t\t\"thresholds\": [\n\t\t\t\t  {\n\t\t\t\t\t\"priority\": \"DEFAULT\",\n\t\t\t\t\t\"max_connections\": 1024,\n\t\t\t\t\t\"max_pending_requests\": 1024,\n\t\t\t\t\t\"max_requests\": 1024,\n\t\t\t\t\t\"max_retries\": 3\n\t\t\t\t  }\n\t\t\t\t]\n\t\t\t  }\n\t\t\t}",
          "envoy_listener_json": "{\n\t\t\t\t\"name\" : \"hawkeye-service\",\n\t\t\t\t\"address\": {\n\t\t\t\t  \"socket_address\": {\n\t\t\t\t\t\"address\": \"0.0.0.0\",\n\t\t\t\t\t\"port_value\": 14000\n\t\t\t\t  }\n\t\t\t\t},\n\t\t\t\t\"filter_chains\": [\n\t\t\t\t  {\n\t\t\t\t\t\"filters\": [\n\t\t\t\t\t  {\n\t\t\t\t\t\t\"name\": \"envoy.http_connection_manager\",\n\t\t\t\t\t\t\"config\": {\n\t\t\t\t\t\t  \"route_config\": {\n\t\t\t\t\t\t\t\"name\": \"hawkeye-service\",\n\t\t\t\t\t\t\t\"virtual_hosts\": [\n\t\t\t\t\t\t\t  {\n\t\t\t\t\t\t\t\t\"name\": \"hawkeye-service\",\n\t\t\t\t\t\t\t\t\"routes\": [\n\t\t\t\t\t\t\t\t  {\n\t\t\t\t\t\t\t\t\t\"route\": {\n\t\t\t\t\t\t\t\t\t  \"cluster\" : \"hawkeye-service\",\n\t\t\t\t\t\t\t\t\t  \"timeout\": \"90s\",\n\t\t\t\t\t\t\t\t\t  \"retry_policy\": {\n\t\t\t\t\t\t\t\t\t\t\t\"retry_on\": \"5xx,connect-failure\",\n\t\t\t\t\t\t\t\t\t\t\t\"num_retries\" : 2,\n\t\t\t\t\t\t\t\t\t\t\t\"per_try_timeout\" : \"60s\"\n\t\t\t\t\t\t\t\t\t  }\n\t\t\t\t\t\t\t\t\t  \n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"match\": {\n\t\t\t\t\t\t\t\t\t  \"prefix\": \"/\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t  }\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\"domains\": [\n\t\t\t\t\t\t\t\t  \"*\"\n\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t  }\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t  },\n\t\t\t\t\t\t  \"tracing\": {\n\t\t\t\t\t\t\t\"random_sampling\": {},\n\t\t\t\t\t\t\t\"operation_name\": \"EGRESS\"\n\t\t\t\t\t\t  },\n\t\t\t\t\t\t  \"http_filters\": [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t  \"name\": \"envoy.router\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t  ],\n\t\t\t\t\t\t  \"stat_prefix\": \"hawkeye-service\",\n\t\t\t\t\t\t  \"access_log\": {\n\t\t\t\t\t\t\t\"name\": \"envoy.file_access_log\",\n\t\t\t\t\t\t\t\"config\": {\n\t\t\t\t\t\t\t  \"path\": \"/var/log/envoy-access/hawkeye-service.log\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t  },\n\t\t\t\t\t\t  \"codec_type\": \"AUTO\"\n\t\t\t\t\t\t}\n\t\t\t\t\t  }\n\t\t\t\t\t]\n\t\t\t\t  }\n\t\t\t\t]\n\t\t\t  }\n\t\t\t"
        },
        "MeshGateway": {
          "Mode": ""
        }
      }
    ],
    "MeshGateway": {
      "Mode": ""
    }
  }
}

curl http://localhost:19000/config_dump | jq

{
  "configs": [
    {
      "@type": "type.googleapis.com/envoy.admin.v2alpha.BootstrapConfigDump",
      "bootstrap": {
        "node": {
          "id": "240ba83a698d-sidecar-proxy",
          "cluster": "goserver-t",
          "build_version": "e95ef6bc43daeda16451ad4ef20979d8e07a5299/1.10.0/clean-getenvoy-88b3e02/RELEASE/BoringSSL"
        },
        "static_resources": {
          "clusters": [
            {
              "name": "local_agent",
              "type": "STATIC",
              "connect_timeout": "1s",
              "hosts": [
                {
                  "socket_address": {
                    "address": "172.31.20.6",
                    "port_value": 8502
                  }
                }
              ],
              "http2_protocol_options": {}
            }
          ]
        },
        "dynamic_resources": {
          "lds_config": {
            "ads": {}
          },
          "cds_config": {
            "ads": {}
          },
          "ads_config": {
            "api_type": "GRPC",
            "grpc_services": [
              {
                "envoy_grpc": {
                  "cluster_name": "local_agent"
                },
                "initial_metadata": [
                  {
                    "key": "x-consul-token"
                  }
                ]
              }
            ]
          }
        },
        "stats_sinks": [
          {
            "name": "envoy.dog_statsd",
            "config": {
              "address": {
                "socket_address": {
                  "port_value": 8125,
                  "protocol": "UDP",
                  "address": "172.31.20.6"
                }
              }
            }
          }
        ],
        "stats_flush_interval": "10s",
        "admin": {
          "access_log_path": "/dev/null",
          "address": {
            "socket_address": {
              "address": "127.0.0.1",
              "port_value": 19000
            }
          }
        },
        "stats_config": {
          "stats_tags": [
            {
              "tag_name": "nomad-task-name",
              "fixed_value": "goserver-t"
            },
            {
              "tag_name": "host-machine",
              "fixed_value": "<no value>"
            },
            {
              "tag_name": "team-name",
              "fixed_value": "<no value>"
            }
          ]
        }
      },
      "last_updated": "2019-08-22T15:49:50.928Z"
    },
    {
      "@type": "type.googleapis.com/envoy.admin.v2alpha.ClustersConfigDump",
      "version_info": "00000001",
      "static_clusters": [
        {
          "cluster": {
            "name": "local_agent",
            "type": "STATIC",
            "connect_timeout": "1s",
            "hosts": [
              {
                "socket_address": {
                  "address": "172.31.20.6",
                  "port_value": 8502
                }
              }
            ],
            "http2_protocol_options": {}
          },
          "last_updated": "2019-08-22T15:49:50.930Z"
        }
      ],
      "dynamic_active_clusters": [
        {
          "version_info": "00000001",
          "cluster": {
            "name": "hawkeye-service.default.us-east-1d.internal.5ecdd36a-e2ab-f1c5-b37b-f05a78cd837b.consul",
            "type": "EDS",
            "eds_cluster_config": {
              "eds_config": {
                "ads": {}
              }
            },
            "connect_timeout": "5s",
            "tls_context": {
              "common_tls_context": {
                "tls_params": {},
                "tls_certificates": [
                  {
                    "certificate_chain": {
                      "inline_string": "-----BEGIN CERTIFICATE-----\nMIICozCCAkmgAwIBAgIDBoFoMAoGCCqGSM49BAMCMBsxGTAXBgNVBAMTEENvbnN1\nbCBDQSAyNjEzMDEwHhcNMTkwODIyMTQxMzIyWhcNMTkwODI1MTQxMzIyWjAVMRMw\nEQYDVQQDEwpnb3NlcnZlci10MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE/OKA\nrnFPLcTsP78rocFNBrkfjG9ofJHZgktSA0E2HMKLnImX7/obedvUxVZKOvHet2zL\n27tGvG16u8ra39SqOaOCAYAwggF8MA4GA1UdDwEB/wQEAwIDuDAdBgNVHSUEFjAU\nBggrBgEFBQcDAgYIKwYBBQUHAwEwDAYDVR0TAQH/BAIwADBoBgNVHQ4EYQRfNmQ6\nMzE6ODc6NTI6YjU6MmY6Mzg6MGI6NTE6ODU6Nzc6YjQ6Yzk6Yjc6MDg6ZDI6MGY6\nYzM6MDc6ZDA6MDQ6ZmM6NzU6ZWE6MmM6YzM6YWQ6YTI6M2E6ZDY6YTk6NzEwagYD\nVR0jBGMwYYBfNmQ6MzE6ODc6NTI6YjU6MmY6Mzg6MGI6NTE6ODU6Nzc6YjQ6Yzk6\nYjc6MDg6ZDI6MGY6YzM6MDc6ZDA6MDQ6ZmM6NzU6ZWE6MmM6YzM6YWQ6YTI6M2E6\nZDY6YTk6NzEwZwYDVR0RBGAwXoZcc3BpZmZlOi8vNWVjZGQzNmEtZTJhYi1mMWM1\nLWIzN2ItZjA1YTc4Y2Q4MzdiLmNvbnN1bC9ucy9kZWZhdWx0L2RjL3VzLWVhc3Qt\nMWQvc3ZjL2dvc2VydmVyLXQwCgYIKoZIzj0EAwIDSAAwRQIgBT2IeBpPMNpTuPLE\nZQz11q2yIeO9V7s/YewdbqRK4kkCIQCu50Z2u56CapC/FBW/3Oh/lVMSP7POBZsi\n+YyRyP8LDg==\n-----END CERTIFICATE-----\n"
                    },
                    "private_key": {
                      "inline_string": "-----BEGIN EC PRIVATE KEY-----\nMHcCAQEEIEWEiJspuDO75FjV+n0R/6JZWO36rVN7luZMzWS8+sRMoAoGCCqGSM49\nAwEHoUQDQgAE/OKArnFPLcTsP78rocFNBrkfjG9ofJHZgktSA0E2HMKLnImX7/ob\nedvUxVZKOvHet2zL27tGvG16u8ra39SqOQ==\n-----END EC PRIVATE KEY-----\n"
                    }
                  }
                ],
                "validation_context": {
                  "trusted_ca": {
                    "inline_string": "-----BEGIN CERTIFICATE-----\nMIICZDCCAgugAwIBAgIDA/y1MAoGCCqGSM49BAMCMBsxGTAXBgNVBAMTEENvbnN1\nbCBDQSAyNjEzMDEwHhcNMTkwODEyMTIzNTM5WhcNMjkwODEyMTIzNTM5WjAbMRkw\nFwYDVQQDExBDb25zdWwgQ0EgMjYxMzAxMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcD\nQgAEXfhaeWJOXqRhS2LHrLbgP8Suf5PCLMu3tlMAsy4HCL80DNoBLo6aQeG9WIaG\nq+6r2ui1jqaBChMFHoyxD4QIqaOCATwwggE4MA4GA1UdDwEB/wQEAwIBhjAPBgNV\nHRMBAf8EBTADAQH/MGgGA1UdDgRhBF82ZDozMTo4Nzo1MjpiNToyZjozODowYjo1\nMTo4NTo3NzpiNDpjOTpiNzowODpkMjowZjpjMzowNzpkMDowNDpmYzo3NTplYToy\nYzpjMzphZDphMjozYTpkNjphOTo3MTBqBgNVHSMEYzBhgF82ZDozMTo4Nzo1Mjpi\nNToyZjozODowYjo1MTo4NTo3NzpiNDpjOTpiNzowODpkMjowZjpjMzowNzpkMDow\nNDpmYzo3NTplYToyYzpjMzphZDphMjozYTpkNjphOTo3MTA/BgNVHREEODA2hjRz\ncGlmZmU6Ly81ZWNkZDM2YS1lMmFiLWYxYzUtYjM3Yi1mMDVhNzhjZDgzN2IuY29u\nc3VsMAoGCCqGSM49BAMCA0cAMEQCIG8KxEinCt7J2K5ru98hAYVIjOF3p0LXjBV2\nGlfirynYAiAgQ5XnxFHjWCAY7kC0TWoL2/VfW9sllgLsKq88KuAtaw==\n-----END CERTIFICATE-----\n"
                  }
                }
              },
              "sni": "hawkeye-service.default.us-east-1d.internal.5ecdd36a-e2ab-f1c5-b37b-f05a78cd837b.consul"
            },
            "outlier_detection": {},
            "common_lb_config": {
              "healthy_panic_threshold": {}
            },
            "alt_stat_name": "hawkeye-service.default.us-east-1d.internal.5ecdd36a-e2ab-f1c5-b37b-f05a78cd837b.consul"
          },
          "last_updated": "2019-08-22T15:49:50.938Z"
        },
        {
          "version_info": "00000001",
          "cluster": {
            "name": "inbound",
            "type": "STATIC",
            "connect_timeout": "90s",
            "circuit_breakers": {
              "thresholds": [
                {
                  "max_connections": 1024,
                  "max_pending_requests": 1024,
                  "max_requests": 1024,
                  "max_retries": 3
                }
              ]
            },
            "load_assignment": {
              "cluster_name": "inbound",
              "endpoints": [
                {
                  "lb_endpoints": [
                    {
                      "endpoint": {
                        "address": {
                          "socket_address": {
                            "address": "127.0.0.1",
                            "port_value": 8181
                          }
                        }
                      }
                    }
                  ]
                }
              ]
            }
          },
          "last_updated": "2019-08-22T15:49:50.937Z"
        }
      ]
    },
    {
      "@type": "type.googleapis.com/envoy.admin.v2alpha.ListenersConfigDump",
      "version_info": "00000001",
      "dynamic_active_listeners": [
        {
          "version_info": "00000001",
          "listener": {
            "name": "inbound",
            "address": {
              "socket_address": {
                "address": "0.0.0.0",
                "port_value": 27582
              }
            },
            "filter_chains": [
              {
                "tls_context": {
                  "common_tls_context": {
                    "tls_params": {},
                    "tls_certificates": [
                      {
                        "certificate_chain": {
                          "inline_string": "-----BEGIN CERTIFICATE-----\nMIICozCCAkmgAwIBAgIDBoFoMAoGCCqGSM49BAMCMBsxGTAXBgNVBAMTEENvbnN1\nbCBDQSAyNjEzMDEwHhcNMTkwODIyMTQxMzIyWhcNMTkwODI1MTQxMzIyWjAVMRMw\nEQYDVQQDEwpnb3NlcnZlci10MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE/OKA\nrnFPLcTsP78rocFNBrkfjG9ofJHZgktSA0E2HMKLnImX7/obedvUxVZKOvHet2zL\n27tGvG16u8ra39SqOaOCAYAwggF8MA4GA1UdDwEB/wQEAwIDuDAdBgNVHSUEFjAU\nBggrBgEFBQcDAgYIKwYBBQUHAwEwDAYDVR0TAQH/BAIwADBoBgNVHQ4EYQRfNmQ6\nMzE6ODc6NTI6YjU6MmY6Mzg6MGI6NTE6ODU6Nzc6YjQ6Yzk6Yjc6MDg6ZDI6MGY6\nYzM6MDc6ZDA6MDQ6ZmM6NzU6ZWE6MmM6YzM6YWQ6YTI6M2E6ZDY6YTk6NzEwagYD\nVR0jBGMwYYBfNmQ6MzE6ODc6NTI6YjU6MmY6Mzg6MGI6NTE6ODU6Nzc6YjQ6Yzk6\nYjc6MDg6ZDI6MGY6YzM6MDc6ZDA6MDQ6ZmM6NzU6ZWE6MmM6YzM6YWQ6YTI6M2E6\nZDY6YTk6NzEwZwYDVR0RBGAwXoZcc3BpZmZlOi8vNWVjZGQzNmEtZTJhYi1mMWM1\nLWIzN2ItZjA1YTc4Y2Q4MzdiLmNvbnN1bC9ucy9kZWZhdWx0L2RjL3VzLWVhc3Qt\nMWQvc3ZjL2dvc2VydmVyLXQwCgYIKoZIzj0EAwIDSAAwRQIgBT2IeBpPMNpTuPLE\nZQz11q2yIeO9V7s/YewdbqRK4kkCIQCu50Z2u56CapC/FBW/3Oh/lVMSP7POBZsi\n+YyRyP8LDg==\n-----END CERTIFICATE-----\n"
                        },
                        "private_key": {
                          "inline_string": "-----BEGIN EC PRIVATE KEY-----\nMHcCAQEEIEWEiJspuDO75FjV+n0R/6JZWO36rVN7luZMzWS8+sRMoAoGCCqGSM49\nAwEHoUQDQgAE/OKArnFPLcTsP78rocFNBrkfjG9ofJHZgktSA0E2HMKLnImX7/ob\nedvUxVZKOvHet2zL27tGvG16u8ra39SqOQ==\n-----END EC PRIVATE KEY-----\n"
                        }
                      }
                    ],
                    "validation_context": {
                      "trusted_ca": {
                        "inline_string": "-----BEGIN CERTIFICATE-----\nMIICZDCCAgugAwIBAgIDA/y1MAoGCCqGSM49BAMCMBsxGTAXBgNVBAMTEENvbnN1\nbCBDQSAyNjEzMDEwHhcNMTkwODEyMTIzNTM5WhcNMjkwODEyMTIzNTM5WjAbMRkw\nFwYDVQQDExBDb25zdWwgQ0EgMjYxMzAxMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcD\nQgAEXfhaeWJOXqRhS2LHrLbgP8Suf5PCLMu3tlMAsy4HCL80DNoBLo6aQeG9WIaG\nq+6r2ui1jqaBChMFHoyxD4QIqaOCATwwggE4MA4GA1UdDwEB/wQEAwIBhjAPBgNV\nHRMBAf8EBTADAQH/MGgGA1UdDgRhBF82ZDozMTo4Nzo1MjpiNToyZjozODowYjo1\nMTo4NTo3NzpiNDpjOTpiNzowODpkMjowZjpjMzowNzpkMDowNDpmYzo3NTplYToy\nYzpjMzphZDphMjozYTpkNjphOTo3MTBqBgNVHSMEYzBhgF82ZDozMTo4Nzo1Mjpi\nNToyZjozODowYjo1MTo4NTo3NzpiNDpjOTpiNzowODpkMjowZjpjMzowNzpkMDow\nNDpmYzo3NTplYToyYzpjMzphZDphMjozYTpkNjphOTo3MTA/BgNVHREEODA2hjRz\ncGlmZmU6Ly81ZWNkZDM2YS1lMmFiLWYxYzUtYjM3Yi1mMDVhNzhjZDgzN2IuY29u\nc3VsMAoGCCqGSM49BAMCA0cAMEQCIG8KxEinCt7J2K5ru98hAYVIjOF3p0LXjBV2\nGlfirynYAiAgQ5XnxFHjWCAY7kC0TWoL2/VfW9sllgLsKq88KuAtaw==\n-----END CERTIFICATE-----\n"
                      }
                    }
                  },
                  "require_client_certificate": true
                },
                "filters": [
                  {
                    "name": "envoy.ext_authz",
                    "config": {
                      "grpc_service": {
                        "initial_metadata": [
                          {
                            "key": "x-consul-token"
                          }
                        ],
                        "envoy_grpc": {
                          "cluster_name": "local_agent"
                        }
                      },
                      "stat_prefix": "connect_authz"
                    }
                  },
                  {
                    "name": "envoy.http_connection_manager",
                    "config": {
                      "access_log": {
                        "name": "envoy.file_access_log",
                        "config": {
                          "path": "/var/log/envoy-access/inbound-goserver-t.log"
                        }
                      },
                      "http_filters": [
                        {
                          "name": "envoy.router"
                        }
                      ],
                      "route_config": {
                        "name": "wildcard",
                        "virtual_hosts": [
                          {
                            "routes": [
                              {
                                "match": {
                                  "prefix": "/"
                                },
                                "route": {
                                  "cluster": "inbound",
                                  "timeout": "90s",
                                  "retry_policy": {
                                    "retry_on": "5xx,connect-failure",
                                    "per_try_timeout": "60s",
                                    "num_retries": 2
                                  }
                                }
                              }
                            ],
                            "domains": [
                              "*"
                            ],
                            "name": "backend"
                          }
                        ]
                      },
                      "tracing": {
                        "random_sampling": {}
                      },
                      "codec_type": "AUTO",
                      "stat_prefix": "ingress_http"
                    }
                  }
                ]
              }
            ]
          },
          "last_updated": "2019-08-22T15:49:50.943Z"
        }
      ]
    },
    {
      "@type": "type.googleapis.com/envoy.admin.v2alpha.RoutesConfigDump",
      "static_route_configs": [
        {
          "route_config": {
            "name": "wildcard",
            "virtual_hosts": [
              {
                "name": "backend",
                "domains": [
                  "*"
                ],
                "routes": [
                  {
                    "match": {
                      "prefix": "/"
                    },
                    "route": {
                      "cluster": "inbound",
                      "timeout": "90s",
                      "retry_policy": {
                        "retry_on": "5xx,connect-failure",
                        "num_retries": 2,
                        "per_try_timeout": "60s"
                      }
                    }
                  }
                ]
              }
            ]
          },
          "last_updated": "2019-08-22T15:49:50.942Z"
        }
      ]
    }
  ]
}

Launching the sidecar

consul connect envoy -http-addr=${CONSUL_RPC_ADDR} -sidecar-for=_nomad-task-${NOMAD_ALLOC_ID}-${NOMAD_TASK_NAME}-${NOMAD_TASK_NAME} -grpc-addr=${HOST_MACHINE_NAME}:8502

[2019-08-22 15:49:50.900][405][info][main] [external/envoy/source/server/server.cc:205] initializing epoch 0 (hot restart version=disabled)
[2019-08-22 15:49:50.901][405][info][main] [external/envoy/source/server/server.cc:207] statically linked extensions:
[2019-08-22 15:49:50.901][405][info][main] [external/envoy/source/server/server.cc:209]   access_loggers: envoy.file_access_log,envoy.http_grpc_access_log
[2019-08-22 15:49:50.902][405][info][main] [external/envoy/source/server/server.cc:212]   filters.http: envoy.buffer,envoy.cors,envoy.ext_authz,envoy.fault,envoy.filters.http.grpc_http1_reverse_bridge,envoy.filters.http.header_to_metadata,envoy.filters.http.jwt_authn,envoy.filters.http.rbac,envoy.filters.http.tap,envoy.grpc_http1_bridge,envoy.grpc_json_transcoder,envoy.grpc_web,envoy.gzip,envoy.health_check,envoy.http_dynamo_filter,envoy.ip_tagging,envoy.lua,envoy.rate_limit,envoy.router,envoy.squash
[2019-08-22 15:49:50.902][405][info][main] [external/envoy/source/server/server.cc:215]   filters.listener: envoy.listener.original_dst,envoy.listener.original_src,envoy.listener.proxy_protocol,envoy.listener.tls_inspector
[2019-08-22 15:49:50.902][405][info][main] [external/envoy/source/server/server.cc:218]   filters.network: envoy.client_ssl_auth,envoy.echo,envoy.ext_authz,envoy.filters.network.dubbo_proxy,envoy.filters.network.mysql_proxy,envoy.filters.network.rbac,envoy.filters.network.sni_cluster,envoy.filters.network.thrift_proxy,envoy.filters.network.zookeeper_proxy,envoy.http_connection_manager,envoy.mongo_proxy,envoy.ratelimit,envoy.redis_proxy,envoy.tcp_proxy
[2019-08-22 15:49:50.902][405][info][main] [external/envoy/source/server/server.cc:220]   stat_sinks: envoy.dog_statsd,envoy.metrics_service,envoy.stat_sinks.hystrix,envoy.statsd
[2019-08-22 15:49:50.902][405][info][main] [external/envoy/source/server/server.cc:222]   tracers: envoy.dynamic.ot,envoy.lightstep,envoy.tracers.datadog,envoy.zipkin
[2019-08-22 15:49:50.902][405][info][main] [external/envoy/source/server/server.cc:225]   transport_sockets.downstream: envoy.transport_sockets.alts,envoy.transport_sockets.tap,raw_buffer,tls
[2019-08-22 15:49:50.902][405][info][main] [external/envoy/source/server/server.cc:228]   transport_sockets.upstream: envoy.transport_sockets.alts,envoy.transport_sockets.tap,raw_buffer,tls
[2019-08-22 15:49:50.902][405][info][main] [external/envoy/source/server/server.cc:234] buffer implementation: old (libevent)
[2019-08-22 15:49:50.928][405][warning][misc] [external/envoy/source/common/protobuf/utility.cc:173] Using deprecated option 'envoy.api.v2.Cluster.hosts' from file cds.proto. This configuration will be removed from Envoy soon. Please see https://github.com/envoyproxy/envoy/blob/master/DEPRECATED.md for details.
[2019-08-22 15:49:50.929][405][info][main] [external/envoy/source/server/server.cc:281] admin address: 127.0.0.1:19000
[2019-08-22 15:49:50.930][405][info][config] [external/envoy/source/server/configuration_impl.cc:50] loading 0 static secret(s)
[2019-08-22 15:49:50.930][405][info][config] [external/envoy/source/server/configuration_impl.cc:56] loading 1 cluster(s)
[2019-08-22 15:49:50.931][405][info][upstream] [external/envoy/source/common/upstream/cluster_manager_impl.cc:133] cm init: initializing cds
[2019-08-22 15:49:50.932][405][info][config] [external/envoy/source/server/configuration_impl.cc:60] loading 0 listener(s)
[2019-08-22 15:49:50.932][405][info][config] [external/envoy/source/server/configuration_impl.cc:85] loading tracing configuration
[2019-08-22 15:49:50.932][405][info][config] [external/envoy/source/server/configuration_impl.cc:105] loading stats sink configuration
[2019-08-22 15:49:50.932][405][info][main] [external/envoy/source/server/server.cc:478] starting main dispatch loop
[2019-08-22 15:49:50.937][405][info][upstream] [external/envoy/source/common/upstream/cluster_manager_impl.cc:477] add/update cluster inbound during init
[2019-08-22 15:49:50.938][405][info][upstream] [external/envoy/source/common/upstream/cluster_manager_impl.cc:477] add/update cluster hawkeye-service.default.us-east-1d.internal.5ecdd36a-e2ab-f1c5-b37b-f05a78cd837b.consul during init
[2019-08-22 15:49:50.938][405][info][upstream] [external/envoy/source/common/upstream/cluster_manager_impl.cc:113] cm init: initializing secondary clusters
[2019-08-22 15:49:50.938][405][info][upstream] [external/envoy/source/common/upstream/cluster_manager_impl.cc:137] cm init: all clusters initialized
[2019-08-22 15:49:50.938][405][info][main] [external/envoy/source/server/server.cc:462] all clusters initialized. initializing init manager
[2019-08-22 15:49:50.943][405][info][upstream] [external/envoy/source/server/lds_api.cc:74] lds: add/update listener 'inbound'
[2019-08-22 15:49:50.944][405][info][config] [external/envoy/source/server/listener_manager_impl.cc:1006] all dependencies initialized. starting workers
[2019-08-22 15:49:50.944][405][warning][config] [bazel-out/k8-opt/bin/external/envoy/source/common/config/_virtual_includes/grpc_mux_subscription_lib/common/config/grpc_mux_subscription_impl.h:77] gRPC config for type.googleapis.com/envoy.api.v2.Listener rejected: Error adding/updating listener(s) hawkeye-service: route: unknown cluster 'hawkeye-service'

Is it possible to override the cluster name in listener and cluster using envoy_listener_json and envoy_cluster_json
I am trying to override the following in the listener

  "stat_prefix": "{{.CONSUL_SERVICE_NAME}}",
						  "access_log": {
							"name": "envoy.file_access_log",
							"config": {
							  "path": "/var/log/envoy-access/{{.CONSUL_SERVICE_NAME}}.log"
							}
						  },

and

  "stat_prefix": "{{.CONSUL_SERVICE_NAME}}",
						  "access_log": {
							"name": "envoy.file_access_log",
							"config": {
							  "path": "/var/log/envoy-access/{{.CONSUL_SERVICE_NAME}}.log"
							}
						  },

Any help would be highly appreciated

@skyrocknroll skyrocknroll changed the title consul connect ignores envoy_listener_json & envoy_cluster_json consul connect ignores envoy_listener_json & envoy_cluster_json un proxy.upstream[].config Aug 22, 2019
@skyrocknroll skyrocknroll changed the title consul connect ignores envoy_listener_json & envoy_cluster_json un proxy.upstream[].config consul connect ignores envoy_listener_json & envoy_cluster_json in proxy.upstream[].config Aug 22, 2019
@rboyer
Copy link
Member

rboyer commented Aug 22, 2019

Have you created any service-router, service-splitter, or service-resolver config entries for this service? Those two escape hatches are incompatible with the new L7 stuff at this time: #6350

@skyrocknroll
Copy link
Author

@rboyer no. I have not created any of those

@rboyer rboyer added this to the 1.6.0-final milestone Aug 22, 2019
@rboyer
Copy link
Member

rboyer commented Aug 22, 2019

This is a bug being fixed in #6378

@rboyer rboyer closed this as completed Aug 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants