We use envoy to have another reverse proxy after NGINX in our Unguard family.
If you want to develop this isolated from the rest of Unguard, do the following:
docker build -t envoy-proxy .
docker run -it -p 8080:8080 envoy-proxy
There is a custom health endpoint that can be used to check the availability of internal services.
curl -I http://unguard.kube/healthz?path=unguard-microblog-service
The proxy has a mix of static and dynamic configuration.
- The
listener_static
on port8080
routes to other Unguard services. - The
listener_dynamic
on port8081
is dynamically configured by the file contents inlistener-ds.yaml
. Right now, it provides the health endpoint.
The dynamic configuration can be changed at runtime.
Just modify listener-ds.yaml
in /etc/envoy/unguard
.
After modifying the file, temporarily move it, because Envoy only watches for file moves and no content changes.
mv /etc/envoy/unguard/listener-ds.yaml /etc/envoy/unguard/listener-ds.bak.yaml
mv /etc/envoy/unguard/listener-ds.bak.yaml /etc/envoy/unguard/listener-ds.yaml