allegro / envoy-control

Envoy Control is a platform-agnostic, production-ready Control Plane for Service Mesh based on Envoy Proxy.
Apache License 2.0
100 stars 33 forks source link

Support instances with hostname #9

Open slonka opened 5 years ago

slonka commented 5 years ago

author: @jakubdyszkiewicz

Envoy throws an error when there are instances with hostaname instead of IP.

An error thrown by Envoy

[2018-11-08 09:29:32.855][23590][warning][config] bazel-out/k8-opt/bin/source/common/config/_virtual_includes/grpc_mux_subscription_lib/common/config/grpc_mux_subscription_impl.h:70] gRPC config for type.googleapis.com/envoy.api.v2.ClusterLoadAssignment rejected: malformed IP address: lrgw1.fivecamel-dev.pl-kra-3.dc4.local. Consider setting resolver_name or setting cluster type to 'STRICT_DNS' or 'LOGICAL_DNS'

AC:

chemicL commented 4 years ago

This works as designed. We have a separate configuration for domains and it's undesired to have a cluster with both IPs and domain as the endpoints.

slonka commented 4 years ago

This is supposed to be support for services registered as domains in Consul (not ips).

danielkwinsor commented 3 years ago

I have had success when using domain names in the following way: Use STRICT_DNS when the IP from DNS won't change. Use LOGICAL_DNS when the IP might change, as in the cloud.

slonka commented 3 years ago

@danielkwinsor we know that we can use STRICT_DNS and LOGICAL_DNS but AFAIK there is no way to mix both EDS and DNS clusters under the same name. If you need to configure a STRICT_DNS cluster use domain field in metadata https://envoy-control.readthedocs.io/en/latest/features/permissions/ . You can see how it's translated into a cluster here: https://github.com/allegro/envoy-control/blob/e73204a649db0acd474c1fcc7d3b9e3c13f825f3/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/snapshot/resource/clusters/EnvoyClustersFactory.kt#L188