mirror of
https://github.com/status-im/consul.git
synced 2025-01-11 22:34:55 +00:00
9ed325ba8b
The DNS resolution will be handled by Envoy and defaults to LOGICAL_DNS. This discovery type can be overridden on a per-gateway basis with the envoy_dns_discovery_type Gateway Option. If a service contains an instance with a hostname as an address we set the Envoy cluster to use DNS as the discovery type rather than EDS. Since both mesh gateways and terminating gateways route to clusters using SNI, whenever there is a mix of hostnames and IP addresses associated with a service we use the hostname + CDS rather than the IPs + EDS. Note that we detect hostnames by attempting to parse the service instance's address as an IP. If it is not a valid IP we assume it is a hostname.
10 lines
228 B
Bash
10 lines
228 B
Bash
#!/bin/bash
|
|
|
|
set -euo pipefail
|
|
|
|
# wait for bootstrap to apply config entries
|
|
wait_for_config_entry terminating-gateway terminating-gateway
|
|
|
|
gen_envoy_bootstrap terminating-gateway 20000 primary true
|
|
gen_envoy_bootstrap s1 19000
|