Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions examples/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,14 @@ filegroup(
"cors/backend/service-envoy.yaml",
"cors/frontend/front-envoy.yaml",
"cors/frontend/service-envoy.yaml",
"csrf/crosssite/front-envoy.yaml",
"csrf/samesite/front-envoy.yaml",
"csrf/service-envoy.yaml",
"ext_authz/config/grpc-service/v2.yaml",
"ext_authz/config/grpc-service/v3.yaml",
"ext_authz/config/http-service.yaml",
"ext_authz/config/opa-service/v2.yaml",
"fault-injection/envoy.yaml",
"front-proxy/front-envoy.yaml",
"front-proxy/service-envoy.yaml",
"grpc-bridge/client/envoy-proxy.yaml",
Expand All @@ -27,6 +32,8 @@ filegroup(
"load-reporting-service/service-envoy-w-lrs.yaml",
"lua/envoy.yaml",
"lua/lib/mylibrary.lua",
"mysql/envoy.yaml",
"redis/envoy.yaml",
"zipkin-tracing/front-envoy-zipkin.yaml",
"zipkin-tracing/service1-envoy-zipkin.yaml",
"zipkin-tracing/service2-envoy-zipkin.yaml",
Expand Down
2 changes: 2 additions & 0 deletions examples/cors/backend/Dockerfile-frontenvoy
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ FROM envoyproxy/envoy-dev:latest

RUN apt-get update && apt-get -q install -y \
curl
COPY ./front-envoy.yaml /etc/front-envoy.yaml
RUN chmod go+r /etc/front-envoy.yaml
CMD /usr/local/bin/envoy -c /etc/front-envoy.yaml --service-cluster front-proxy
2 changes: 0 additions & 2 deletions examples/cors/backend/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ services:
build:
context: .
dockerfile: Dockerfile-frontenvoy
volumes:
- ./front-envoy.yaml:/etc/front-envoy.yaml
networks:
- envoymesh
expose:
Expand Down
2 changes: 2 additions & 0 deletions examples/cors/frontend/Dockerfile-frontenvoy
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ FROM envoyproxy/envoy-dev:latest

RUN apt-get update && apt-get -q install -y \
curl
COPY ./front-envoy.yaml /etc/front-envoy.yaml
RUN chmod go+r /etc/front-envoy.yaml
CMD /usr/local/bin/envoy -c /etc/front-envoy.yaml --service-cluster front-proxy
2 changes: 0 additions & 2 deletions examples/cors/frontend/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ services:
build:
context: .
dockerfile: Dockerfile-frontenvoy
volumes:
- ./front-envoy.yaml:/etc/front-envoy.yaml
networks:
- envoymesh
expose:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ FROM envoyproxy/envoy-dev:latest

RUN apt-get update && apt-get -q install -y \
curl
COPY ./front-envoy.yaml /etc/front-envoy.yaml
RUN chmod go+r /etc/front-envoy.yaml
CMD /usr/local/bin/envoy -c /etc/front-envoy.yaml --service-cluster front-proxy
4 changes: 1 addition & 3 deletions examples/csrf/crosssite/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@ services:

front-envoy:
build:
context: ..
context: .
dockerfile: Dockerfile-frontenvoy
volumes:
- ./front-envoy.yaml:/etc/front-envoy.yaml
networks:
- envoymesh
expose:
Expand Down
2 changes: 1 addition & 1 deletion examples/csrf/crosssite/front-envoy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ static_resources:
- name: envoy.access_loggers.file
typed_config:
"@type": type.googleapis.com/envoy.config.accesslog.v2.FileAccessLog
path: "/var/log/access.log"
path: "/dev/stdout"
route_config:
name: local_route
virtual_hosts:
Expand Down
7 changes: 7 additions & 0 deletions examples/csrf/samesite/Dockerfile-frontenvoy
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM envoyproxy/envoy-dev:latest

RUN apt-get update && apt-get -q install -y \
curl
COPY ./front-envoy.yaml /etc/front-envoy.yaml
RUN chmod go+r /etc/front-envoy.yaml
CMD /usr/local/bin/envoy -c /etc/front-envoy.yaml --service-cluster front-proxy
4 changes: 1 addition & 3 deletions examples/csrf/samesite/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@ services:

front-envoy:
build:
context: ..
context: .
dockerfile: Dockerfile-frontenvoy
volumes:
- ./front-envoy.yaml:/etc/front-envoy.yaml
networks:
- envoymesh
expose:
Expand Down
27 changes: 18 additions & 9 deletions examples/csrf/samesite/front-envoy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,25 @@ static_resources:
- name: envoy.access_loggers.file
typed_config:
"@type": type.googleapis.com/envoy.config.accesslog.v2.FileAccessLog
path: "/var/log/access.log"
path: "/dev/stdout"
route_config:
name: local_route
virtual_hosts:
- name: www
domains:
- "*"
cors:
allow_origin:
- "*"
allow_origin_string_match:
- safe_regex:
google_re2: {}
regex: \*
filter_enabled:
default_value:
numerator: 100
denominator: HUNDRED
per_filter_config:
typed_per_filter_config:
envoy.filters.http.csrf:
"@type": type.googleapis.com/envoy.extensions.filters.http.csrf.v3.CsrfPolicy
filter_enabled:
default_value:
numerator: 100
Expand All @@ -46,8 +49,9 @@ static_resources:
prefix: "/csrf/disabled"
route:
cluster: generic_service
per_filter_config:
typed_per_filter_config:
envoy.filters.http.csrf:
"@type": type.googleapis.com/envoy.extensions.filters.http.csrf.v3.CsrfPolicy
filter_enabled:
default_value:
numerator: 0
Expand All @@ -56,8 +60,9 @@ static_resources:
prefix: "/csrf/shadow"
route:
cluster: generic_service
per_filter_config:
typed_per_filter_config:
envoy.filters.http.csrf:
"@type": type.googleapis.com/envoy.extensions.filters.http.csrf.v3.CsrfPolicy
filter_enabled:
default_value:
numerator: 0
Expand All @@ -70,14 +75,17 @@ static_resources:
prefix: "/csrf/additional_origin"
route:
cluster: generic_service
per_filter_config:
typed_per_filter_config:
envoy.filters.http.csrf:
"@type": type.googleapis.com/envoy.extensions.filters.http.csrf.v3.CsrfPolicy
filter_enabled:
default_value:
numerator: 100
denominator: HUNDRED
additional_origins:
- regex: .*
- safe_regex:
google_re2: {}
regex: .*
- match:
prefix: "/"
route:
Expand All @@ -86,7 +94,8 @@ static_resources:
- name: envoy.filters.http.cors
typed_config: {}
- name: envoy.filters.http.csrf
config:
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.http.csrf.v3.CsrfPolicy
filter_enabled:
default_value:
numerator: 0
Expand Down
9 changes: 9 additions & 0 deletions examples/ext_authz/Dockerfile-frontenvoy
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM envoyproxy/envoy-dev:latest

RUN apt-get update && apt-get -q install -y \
curl
COPY ./config /etc/envoy-config
COPY ./run_envoy.sh /run_envoy.sh
RUN chmod go+r -R /etc/envoy-config \
&& chmod go+rx /run_envoy.sh /etc/envoy-config /etc/envoy-config/*
CMD /run_envoy.sh
8 changes: 4 additions & 4 deletions examples/ext_authz/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ services:

front-envoy:
build:
context: ../
dockerfile: front-proxy/Dockerfile-frontenvoy
volumes:
- ./${FRONT_ENVOY_YAML}:/etc/front-envoy.yaml
context: .
dockerfile: Dockerfile-frontenvoy
environment:
- FRONT_ENVOY_YAML
networks:
- envoymesh
expose:
Expand Down
3 changes: 3 additions & 0 deletions examples/ext_authz/run_envoy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

/usr/local/bin/envoy -c "/etc/envoy-${FRONT_ENVOY_YAML}" --service-cluster front-proxy
2 changes: 2 additions & 0 deletions examples/fault-injection/Dockerfile-envoy
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM envoyproxy/envoy-dev:latest

RUN apt-get update && apt-get install -y curl tree
COPY ./envoy.yaml /etc/envoy.yaml
RUN chmod go+r /etc/envoy.yaml
COPY enable_delay_fault_injection.sh disable_delay_fault_injection.sh enable_abort_fault_injection.sh disable_abort_fault_injection.sh send_request.sh /
1 change: 0 additions & 1 deletion examples/fault-injection/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ services:
dockerfile: Dockerfile-envoy
command: /usr/local/bin/envoy -c /etc/envoy.yaml
volumes:
- ./envoy.yaml:/etc/envoy.yaml
- ./runtime:/srv/runtime
networks:
- envoymesh
Expand Down
9 changes: 6 additions & 3 deletions examples/fault-injection/envoy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ admin:
socket_address:
address: 0.0.0.0
port_value: 9901
runtime:
symlink_root: /srv/runtime/current
subdirectory: envoy
layered_runtime:
layers:
- name: disk_layer_0
disk_layer:
symlink_root: /srv/runtime/current
subdirectory: envoy
2 changes: 2 additions & 0 deletions examples/front-proxy/Dockerfile-frontenvoy
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ FROM envoyproxy/envoy-dev:latest

RUN apt-get update && apt-get -q install -y \
curl
COPY ./front-envoy.yaml /etc/front-envoy.yaml
RUN chmod go+r /etc/front-envoy.yaml
CMD /usr/local/bin/envoy -c /etc/front-envoy.yaml --service-cluster front-proxy
2 changes: 0 additions & 2 deletions examples/front-proxy/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ services:
build:
context: .
dockerfile: Dockerfile-frontenvoy
volumes:
- ./front-envoy.yaml:/etc/front-envoy.yaml
networks:
- envoymesh
expose:
Expand Down
5 changes: 5 additions & 0 deletions examples/grpc-bridge/Dockerfile-client
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM envoyproxy/envoy-dev:latest

COPY ./client/envoy-proxy.yaml /etc/client-envoy-proxy.yaml
RUN chmod go+r /etc/client-envoy-proxy.yaml
CMD /usr/local/bin/envoy -c /etc/client-envoy-proxy.yaml
5 changes: 5 additions & 0 deletions examples/grpc-bridge/Dockerfile-server
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM envoyproxy/envoy-dev:latest

COPY ./server/envoy-proxy.yaml /etc/server-envoy-proxy.yaml
RUN chmod go+r /etc/server-envoy-proxy.yaml
CMD /usr/local/bin/envoy -c /etc/server-envoy-proxy.yaml --service-cluster backend-proxy
14 changes: 6 additions & 8 deletions examples/grpc-bridge/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@ services:
- kv-backend-service

grpc-server-proxy:
image: envoyproxy/envoy:latest
command: /usr/local/bin/envoy -c /etc/server-envoy-proxy.yaml --service-cluster backend-proxy
volumes:
- ./server/envoy-proxy.yaml:/etc/server-envoy-proxy.yaml
build:
context: .
dockerfile: Dockerfile-server
networks:
envoymesh:
aliases:
Expand All @@ -45,10 +44,9 @@ services:
- grpc-client

grpc-client-proxy:
image: envoyproxy/envoy:latest
command: /usr/local/bin/envoy -c /etc/client-envoy-proxy.yaml
volumes:
- ./client/envoy-proxy.yaml:/etc/client-envoy-proxy.yaml
build:
context: .
dockerfile: Dockerfile-client
networks:
envoymesh:
aliases:
Expand Down
17 changes: 17 additions & 0 deletions examples/jaeger-native-tracing/Dockerfile-frontenvoy
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM envoyproxy/envoy-dev:latest

RUN apt-get update && apt-get -q install -y \
curl
COPY ./front-envoy-jaeger.yaml /etc/front-envoy.yaml
#
# for discussion on jaeger binary compatibility, and the source of the file, see here:
# https://github.com/envoyproxy/envoy/issues/11382#issuecomment-638012072
#
RUN echo "4a7d17d4724ee890490bcd6cfdedb12a02316a3d33214348d30979abd201f1ca /usr/local/lib/libjaegertracing_plugin.so" > /tmp/checksum \
&& curl -Ls https://github.com/tetratelabs/getenvoy-package/files/3518103/getenvoy-centos-jaegertracing-plugin.tar.gz \
| tar zxf - -C /usr/local/lib \
&& mv /usr/local/lib/libjaegertracing.so.0.4.2 /usr/local/lib/libjaegertracing_plugin.so \
&& sha256sum -c /tmp/checksum \
&& rm /tmp/checksum \
&& chmod go+r /etc/front-envoy.yaml
CMD /usr/local/bin/envoy -c /etc/front-envoy.yaml --service-cluster front-proxy
17 changes: 4 additions & 13 deletions examples/jaeger-native-tracing/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,8 @@ services:

front-envoy:
build:
context: ../
dockerfile: front-proxy/Dockerfile-frontenvoy
volumes:
- ./front-envoy-jaeger.yaml:/etc/front-envoy.yaml
- ./install-jaeger-plugin.sh:/install-jaeger-plugin.sh
- ./start-front.sh:/start-front.sh
entrypoint: /start-front.sh
context: .
dockerfile: Dockerfile-frontenvoy
networks:
- envoymesh
expose:
Expand All @@ -28,9 +23,7 @@ services:
dockerfile: Dockerfile-service
volumes:
- ./service1-envoy-jaeger.yaml:/etc/service-envoy.yaml
- ./install-jaeger-plugin.sh:/install-jaeger-plugin.sh
- ./start-service.sh:/start-service.sh
entrypoint: /start-service.sh
- ./libjaegertracing.so.0.4.2:/usr/local/lib/libjaegertracing_plugin.so
networks:
envoymesh:
aliases:
Expand All @@ -49,9 +42,7 @@ services:
dockerfile: Dockerfile-service
volumes:
- ./service2-envoy-jaeger.yaml:/etc/service-envoy.yaml
- ./install-jaeger-plugin.sh:/install-jaeger-plugin.sh
- ./start-service.sh:/start-service.sh
entrypoint: /start-service.sh
- ./libjaegertracing.so.0.4.2:/usr/local/lib/libjaegertracing_plugin.so
networks:
envoymesh:
aliases:
Expand Down
3 changes: 0 additions & 3 deletions examples/jaeger-native-tracing/start-front.sh

This file was deleted.

3 changes: 0 additions & 3 deletions examples/jaeger-native-tracing/start-service.sh

This file was deleted.

7 changes: 7 additions & 0 deletions examples/jaeger-tracing/Dockerfile-frontenvoy
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM envoyproxy/envoy-dev:latest

RUN apt-get update && apt-get -q install -y \
curl
COPY ./front-envoy-jaeger.yaml /etc/front-envoy.yaml
RUN chmod go+r /etc/front-envoy.yaml
CMD /usr/local/bin/envoy -c /etc/front-envoy.yaml --service-cluster front-proxy
6 changes: 2 additions & 4 deletions examples/jaeger-tracing/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@ services:

front-envoy:
build:
context: ../
dockerfile: front-proxy/Dockerfile-frontenvoy
volumes:
- ./front-envoy-jaeger.yaml:/etc/front-envoy.yaml
context: .
dockerfile: Dockerfile-frontenvoy
networks:
- envoymesh
expose:
Expand Down
2 changes: 2 additions & 0 deletions examples/lua/Dockerfile-proxy
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
FROM envoyproxy/envoy-dev:latest
ADD ./lib/mylibrary.lua /lib/mylibrary.lua
COPY ./envoy.yaml /etc/envoy.yaml
RUN chmod go+r /etc/envoy.yaml /lib/mylibrary.lua
CMD /usr/local/bin/envoy -c /etc/envoy.yaml -l debug --service-cluster proxy
2 changes: 0 additions & 2 deletions examples/lua/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ services:
build:
context: .
dockerfile: Dockerfile-proxy
volumes:
- ./envoy.yaml:/etc/envoy.yaml
networks:
- envoymesh
expose:
Expand Down
Loading