DNS Filter
DNS Filter is under active development and should be considered alpha and not production ready.
The filter supports local and external DNS resolution. If a lookup for a name does not match a statically configured domain, or a provisioned cluster name, Envoy can refer the query to an external resolver for an answer. Users have the option of specifying the DNS servers that Envoy will use for external resolution. Users can disable external DNS resolution by omitting the client configuration object.
The filter supports . An Example configuration follows that illustrates how the filter can be used.
In this example, Envoy is configured to respond to client queries for five domains. For any other query, it will forward upstream to external resolvers. The filter will return an address matching the input query type. If the query is for type A records and no A records are configured, Envoy will return no addresses and set the response code appropriately. Conversely, if there are matching records for the query type, each configured address is returned. This is also true for AAAA records. Only A, AAAA, and SRV records are supported. If the filter parses queries for other record types, the filter immediately responds indicating that the type is not supported. The filter can also redirect a query for a DNS name to the endpoints of a cluster. “www.domain4.com” in the configuration demonstrates this. Along with an address list, a cluster name is a valid endpoint for a DNS name.
Each service record’s protocol can be defined by a name or number. As configured in the example, the filter will successfully respond to SRV record requests for “_sip._tcp.voip.domain5.com”. If a numerical value is specified, Envoy will attempt to resolve the number to a name. String values for protocols are used as they appear. An underscore is prepended to both the service and protocol to adhere to the convention outlined in the RFC.
The filter can also consume its domain configuration from an external DNS table. The same entities appearing in the static configuration can be stored as JSON or YAML in a separate file and referenced using the external_dns_table DataSource directive:
In the file, the table can be defined as follows: