Splitting envoy envoy.yaml configuration into multiple files (Docker only)

Sonntag, 22. August 2021, 19:23 Uhr

I am handling four different ports / cases with Envoy:

  • IPv6 http
  • IPv4 http
  • IPv6 https
  • IPv4 https

For IPv6 and IPv4 the configuration is the same, whereas for http there is a different configuration than for https.

To realize this, I have split my envoy configuration into several snippets, and add them together during building of the container.

Here is what my new Dockerfile looks like:

FROM envoyproxy/envoy:latest
COPY config /tmp/config
RUN cat /tmp/config/envoy_head.yaml /tmp/config/http_head_one.yaml /tmp/config/http_body.yaml /tmp/config/http_head_two.yaml /tmp/config/http_body.yaml /tmp/config/https_head_one.yaml /tmp/config/https_body.yaml /tmp/config/https_head_two.yaml /tmp/config/https_body.yaml /tmp/config/envoy_tail.yaml > /etc/envoy/envoy.yaml

my config folder contains several files which are combined into envoy.yaml

No need to search for “how to include files in yaml files” Smile

image

Here is, for example, my envoy_head.yaml:

static_resources:
   listeners:

As you can see, it is rather simple

(NB: it ends with a newline, as do all the other files – when combining, this will give the desired result).

Don’t forget to build your container, running, for example:

docker-compose up –build

Der Beitrag Splitting envoy envoy.yaml configuration into multiple files (Docker only) erschien zuerst auf pi3g.com.


pi3g e.K.

Als approved Raspberry Pi Reseller in Deutschland arbeiten wir seit Anfang an (2012) besonders eng mit Raspberry Pi zusammen. Wir bieten ehrliche, tiefe technische Kompetenz rund um den Raspberry Pi. Wir vertreiben Raspberry Pi sowie Coral AI hardware, und entwickeln Hardware und Software für unsere Kunden.

Unsere Plattform picockpit.com ermöglicht Nutzern ihre Pis von überall aus ganz leicht per Webinterface zu nutzen. Unsere Apps lösen echte Probleme und machen Nutzer glücklich.