Comments (14)
Unfortunately, while you can set the cluster type to LOGICAL_DNS
in a statically configured cluster, AFAIK there is no way to set a CDS/EDS cluster to use logical DNS. It's a hole in the API.
The way we solve this in rotor is to resolve the DNS entry within the control-plane, and hand out resolved IPs in EDS.
from go-control-plane.
Below code worked for me. webapp-service
is my docker service name. This way envoy resolves webapp-service
to as many IPs as its replica count.
var hosts []*core.Address
dnsRefreshRate := 15 * time.Second
hosts = append(hosts, &core.Address{
Address: &core.Address_SocketAddress{
SocketAddress: &core.SocketAddress{
Protocol: core.TCP,
Address: "webapp-service", // webapp-service is a docker service name
ResolverName: "STRICT_DNS",
PortSpecifier: &core.SocketAddress_PortValue{
PortValue: uint32(8080),
},
},
},
})
cluster := &v2.Cluster{
Name: "my_cluster",
ConnectTimeout: 5 * time.Second,
Type: v2.Cluster_STRICT_DNS,
LbPolicy: v2.Cluster_ROUND_ROBIN,
Hosts: hosts,
DnsLookupFamily: v2.Cluster_V4_ONLY,
DnsRefreshRate: &dnsRefreshRate,
}
from go-control-plane.
Yes, the other way to do this is to embed the hostlist directly in the cluster response, rather than using EDS at all.
from go-control-plane.
Unfortunately, while you can set the cluster type to LOGICAL_DNS in a statically configured cluster, AFAIK there is no way to set a CDS/EDS cluster to use logical DNS. It's a hole in the API.
Is this still the case?
from go-control-plane.
AFAIK yes, but I haven’t been involved with the project for several months.
from go-control-plane.
The alternative solution I provided seems no more of use (from v1.9). As Hosts in the cluster is now deprecated by LoadAssignment of type *ClusterLoadAssignment which uses EDS Cluster. This is troublesome for me too. I am staying at v1.8, as I use Docker as host and need to resolve docker service hostname to (multiple) IP.
In hope support for LOGICAL_DNS in EDS/CDS cluster will be added.
PS: Is there anything we can do to make this support added?
from go-control-plane.
Handing out resolved IPs in the server before they make it to the proxies is the best solution for this. It's a relatively trivial fix as well
from go-control-plane.
I have been using LOGICAL_DNS with envoy container starting with --dns, run dnsmasq at at the IP which can route to different DNS servers based on domains
from go-control-plane.
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.
from go-control-plane.
This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted" or "no stalebot". Thank you for your contributions.
from go-control-plane.
is this issue resolved? can we resolve DNS name with EDS as config?
from go-control-plane.
@binpatel31 I don't think we can. Though, I haven't checked the latest version.
from go-control-plane.
I also would like to know if this issue was addressed. Static config does work but it don't seem to be working for my dynamic config. Whenever I replace an IP with a service name, in my EDS file, I get the following error:
[warning][config] [source/common/config/filesystem_subscription_impl.cc:60] Filesystem config update rejected: malformed IP address: service. Consider setting resolver_name or setting cluster type to 'STRICT_DNS' or 'LOGICAL_DNS'.
I run envoy in a container. Any plans to address this in the near future?
from go-control-plane.
In the attention note of https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/endpoint/v3/endpoint_components.proto#config-endpoint-v3-endpoint
The form of host address depends on the given cluster type. For STATIC or EDS, it is expected to be a direct IP address (or something resolvable by the specified resolver in the Address). For LOGICAL or STRICT DNS, it is expected to be hostname, and will be resolved via DNS.
But its saying [2022-07-20 16:58:29.848][6194][warning][config] [external/envoy/source/common/config/filesystem_subscription_impl.cc:43] Filesystem config update rejected: Error adding/updating listener(s) tcp_1: Unknown address resolver: 8.8.8.8
from go-control-plane.
Related Issues (20)
- For a given envoy commit, how to find the corresponding go control plane commit? HOT 6
- the resource order is not in line with the description in the xds doc HOT 1
- Go apis are currently being built by gcc
- Add MaxMind GeoIP Provider HOT 4
- Sync is now broken HOT 1
- Issue with Handling HttpConnectionManager as ConfigDiscovery HOT 3
- Expose vtprotobuf generation HOT 7
- Outlier detection event log HOT 1
- Add support for async_fetch in remote_jwks in Request Authentication HOT 1
- sotw server impossible to send the eds configuration. HOT 3
- Release schedule for this project? HOT 8
- Support new xds protocol behavior regarding wildcard HOT 2
- This instruction no longer works -> https://github.com/envoyproxy/go-control-plane/blob/main/internal/example/README.md HOT 1
- Deadlock in Delta XDS if number of resources is more than 10 HOT 10
- Excessive Memory Consumption in EnvoyProxy During Continuous snapshot updates for the same node HOT 4
- Is it possible to create a static layer? HOT 3
- How to avoid deprecated warning message for regex matcher? HOT 3
- Not all traces are sent to Zipkin HOT 5
- Goroutine leak in DeltaStreamHandler
- Snapshot with empty version HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-control-plane.