The source distribution includes a set of example configuration templates for each of the three major Envoy deployment types:
The goal of this set of example configurations is to demonstrate the full capabilities of Envoy in a complex deployment. All features will not be applicable to all use cases. For full documentation see the configuration reference.
Envoy configurations can become relatively complicated. At Lyft we use jinja templating to make the configurations easier to create and manage. The source distribution includes a version of the configuration generator that loosely approximates what we use at Lyft. We have also included three example configuration templates for each of the above three scenarios.
- Generator script: configs/configgen.py
- Service to service template: configs/envoy_service_to_service.template.json
- Front proxy template: configs/envoy_front_proxy.template.json
- Double proxy template: configs/envoy_double_proxy.template.json
To generate the example configurations run the following from the root of the repo:
mkdir -p generated/configs configs/configgen.sh generated/configs
The previous command will produce three fully expanded configurations using some variables defined inside of configgen.py. See the comments inside of configgen.py for detailed information on how the different expansions work.
A few notes about the example configurations:
- An instance of service discovery service is assumed to be running at discovery.yourcompany.net.
- DNS for yourcompany.net is assumed to be setup for various things. Search the configuration templates for different instances of this.
- Tracing is configured for LightStep. To disable this delete the tracing configuration.
- The configuration demonstrates the use of a global rate limiting service. To disable this delete the rate limit configuration.
A very minimal Envoy configuration that can be used to validate basic plain HTTP proxying is available in configs/google_com_proxy.json. This is not intended to represent a realistic Envoy deployment. To smoketest Envoy with this, run:
build/source/exe/envoy -c configs/google_com_proxy.json -l debug curl -v localhost:10000