This repository contains the reference configuration for Envoy Proxy instances injected into services integrating with Opsani for cloud infrastructure optimization.
The sidecar is capable of generating the basic set of metrics necessary to optimize an arbitrary web service orchestrated by Kubernetes.
The container entrypoint defines a base-id value of 31337 to avoid conflicts
when multiple copies of Envoy are running in the same host.
The container is configured using a set of environment variables. Required
values are denoted with bold names. These values are interpolated into the
envoy.yaml.tmpl configuration template via the entrypoint.sh script run by
the container.
| Name | Description | Default |
|---|---|---|
OPSANI_ENVOY_PROXY_SERVICE_PORT | The container port receiving HTTP or HTTPS traffic from a Kubernetes Service. | 80 |
OPSANI_ENVOY_PROXIED_CONTAINER_PORT | The container port exposing the proxied HTTP or HTTPS application responsible for handling the requests. | 8080 |
OPSANI_ENVOY_PROXIED_CONTAINER_TLS_ENABLED | Whether or not the OPSANI_ENVOY_PROXIED_CONTAINER_PORT is TLS encrypted (i.e. HTTPS or HTTP/2). Values are true or false. | false |
OPSANI_ENVOY_METRICS_PORT | The HTTP port to expose Envoy admin metrics on. | 9901 |
OPSANI_ENVOY_PROXIED_CONTAINER_ADDR | The address that the proxied container is bound to. This is only changed during development and testing. | 127.0.0.1 |
When running in TLS mode, the following assets must be mounted into the container:
| Path | Description |
|---|---|
/etc/certificate_chain.pem | A complete certificate chain in PEM format for negotiating TLS with the client. |
/etc/private_key.pem | The private key in PEM format for accessing the certificate in order to present it to clients. |
The Envoy base image can be overridden via the ENVOY_BASE_IMAGE Docker build
argument:
docker build --build-arg ENVOY_BASE_IMAGE=other-envoy:latest .
There is a Docker Compose configuration available that runs Nginx and the Envoy Proxy in a configuration that approximates the environment of running in a sidecar deployment.
The configuration can be tested via curl:
| Task | Command | Env |
|---|---|---|
| Nginx via HTTP | curl -v http://localhost:8280 | OPSANI_ENVOY_PROXIED_CONTAINER_PORT=80 |
| Envoy via HTTP | curl -v http://localhost:8281 | OPSANI_ENVOY_PROXIED_CONTAINER_PORT=80 |
| Nginx via HTTPS | curl -kv https://localhost:8643 | OPSANI_ENVOY_PROXIED_CONTAINER_PORT=80 |
| Envoy via HTTPS | curl -v http://localhost:8281 | OPSANI_ENVOY_PROXIED_CONTAINER_PORT=80, OPSANI_ENVOY_PROXIED_CONTAINER_TLS_ENABLED=true |
| Envoy via HTTP to HTTPS | curl -v https://localhost:8281 | OPSANI_ENVOY_PROXIED_CONTAINER_PORT=443 |
| Envoy via HTTPS to HTTPS | curl -kv http://localhost:8281 | OPSANI_ENVOY_PROXIED_CONTAINER_PORT=443, OPSANI_ENVOY_PROXIED_CONTAINER_TLS_ENABLED=true |
The above will be replaced with a proper test suite and build matrix shortly.
Required Cases:
Bonus cases:
OPSANI_ENVOY_PROXIED_CONTAINER_HTTP2_ENABLED.Content type
Image
Digest
sha256:6bd5e2f03…
Size
47.4 MB
Last updated
almost 4 years ago
docker pull opsani/envoy-proxy