uswitch / yggdrasil

Envoy Control Plane for Kubernetes Multi-cluster Ingress
Apache License 2.0
192 stars 17 forks source link

Errors on envoy startup with provided configuration #24

Closed nuriel77 closed 5 years ago

nuriel77 commented 5 years ago

Using the latest envoy docker container:

root@f52a1a331546:/# /usr/local/bin/envoy --version
/usr/local/bin/envoy  version: 3cca9eea6befa5b300230a06516d8f9a46f519df/1.9.0-dev/Clean/RELEASE

Given the example configuration file from yggdrasil README, I get the following error when starting up envoy with it:

[2018-11-20 11:32:51.198][000007][critical][main] [source/server/server.cc:84] error initializing configuration '/etc/envoy/envoy.yaml': envoy::api::v2::core::ConfigSource::GRPC must not have a cluster name specified: api_type: GRPC
cluster_names: "xds_cluster"

This is the configuration I am using:

admin:
  access_log_path: /tmp/admin_access.log
  address:
    socket_address: { address: 0.0.0.0, port_value: 9901 }

dynamic_resources:
  lds_config:
    api_config_source:
      api_type: GRPC
      cluster_names: [xds_cluster]
  cds_config:
    api_config_source:
      api_type: GRPC
      cluster_names: [xds_cluster]

static_resources:
  clusters:
  - name: xds_cluster
    connect_timeout: 0.25s
    type: STATIC
    lb_policy: ROUND_ROBIN
    http2_protocol_options: {}
    hosts: [{ socket_address: { address: 10.132.0.21, port_value: 8080 }}]

Edit: Tried this configuration change:

dynamic_resources:
  lds_config:
    api_config_source:
      api_type: GRPC
      grpc_services:
        envoy_grpc:
          cluster_name: xds_cluster
  cds_config:
    api_config_source:
      api_type: GRPC
      grpc_services:
        envoy_grpc:
          cluster_name: xds_cluster

And it seems to work. Maybe the example in the README has to be changed?

Joseph-Irving commented 5 years ago

Hi @nuriel77, yes there was a breaking change between envoy:1.7.0 and envoy:1.8.0 so the config we have won't work with later versions. we're just in the process of updating Yggdrasil to use the latest envoy client-go and we can update the example when we do that. Probably worth us noting what versions of envoy this has been tested with as well.

Joseph-Irving commented 5 years ago

we've updated the readme with our latest update https://github.com/uswitch/yggdrasil/pull/25, thanks for pointing it out.