From 33d25b8a2f586cb63225118d40cb58eab05a3a75 Mon Sep 17 00:00:00 2001 From: phlax Date: Tue, 12 Apr 2022 19:33:50 +0100 Subject: [PATCH] examples: Cleanups for docker compose (#20777) - Update compose version `3.7` -> `3.8` - prevent base images from starting when running examples - remove unnecessary network configs Signed-off-by: Ryan Northey --- examples/brotli/docker-compose.yaml | 4 +++- examples/cache/docker-compose.yaml | 4 +++- examples/cors/backend/docker-compose.yaml | 4 +++- examples/cors/frontend/docker-compose.yaml | 4 +++- examples/csrf/crosssite/docker-compose.yml | 4 +++- examples/csrf/samesite/docker-compose.yml | 4 +++- examples/double-proxy/docker-compose.yaml | 4 +++- examples/dynamic-config-cp/docker-compose.yaml | 2 +- examples/dynamic-config-fs/docker-compose.yaml | 2 +- examples/ext_authz/docker-compose.yaml | 4 +++- examples/fault-injection/docker-compose.yaml | 8 +------- examples/front-proxy/docker-compose.yaml | 6 +++++- examples/grpc-bridge/docker-compose-protos.yaml | 2 +- examples/grpc-bridge/docker-compose.yaml | 2 +- examples/gzip/docker-compose.yaml | 4 +++- examples/jaeger-native-tracing/docker-compose.yaml | 6 +++++- examples/jaeger-tracing/docker-compose.yaml | 6 +++++- examples/load-reporting-service/docker-compose.yaml | 4 +++- examples/local_ratelimit/docker-compose.yaml | 2 +- examples/locality-load-balancing/docker-compose.yaml | 4 +++- examples/lua/docker-compose.yaml | 9 +-------- examples/mysql/docker-compose.yaml | 2 +- examples/postgres/docker-compose.yaml | 2 +- examples/redis/docker-compose.yaml | 2 +- examples/skywalking-tracing/docker-compose.yaml | 6 +++++- examples/tls-inspector/docker-compose.yaml | 2 +- examples/tls-sni/docker-compose.yaml | 2 +- examples/tls/docker-compose.yaml | 2 +- examples/udp/docker-compose.yaml | 2 +- examples/vrp-litmus/docker-compose.yaml | 7 +------ examples/vrp-local/docker-compose.yaml | 7 +------ examples/wasm-cc/docker-compose-wasm.yaml | 2 +- examples/wasm-cc/docker-compose.yaml | 9 +-------- examples/websocket/docker-compose.yaml | 2 +- examples/win32-front-proxy/docker-compose.yaml | 11 +---------- examples/zipkin-tracing/docker-compose.yaml | 6 +++++- 36 files changed, 78 insertions(+), 75 deletions(-) diff --git a/examples/brotli/docker-compose.yaml b/examples/brotli/docker-compose.yaml index cf761b5ffdd7..d17ab3a57859 100644 --- a/examples/brotli/docker-compose.yaml +++ b/examples/brotli/docker-compose.yaml @@ -1,4 +1,4 @@ -version: "3.7" +version: "3.8" services: flask_service: @@ -6,6 +6,8 @@ services: context: ../shared/flask image: flask_service:python-3.10-slim-bullseye restart: "no" + deploy: + replicas: 0 envoy-stats: build: diff --git a/examples/cache/docker-compose.yaml b/examples/cache/docker-compose.yaml index a94bce3ba4f9..9c927937b3b7 100644 --- a/examples/cache/docker-compose.yaml +++ b/examples/cache/docker-compose.yaml @@ -1,4 +1,4 @@ -version: "3.7" +version: "3.8" services: flask_service: @@ -6,6 +6,8 @@ services: context: ../shared/flask image: flask_service:python-3.10-slim-bullseye restart: "no" + deploy: + replicas: 0 front-envoy: build: diff --git a/examples/cors/backend/docker-compose.yaml b/examples/cors/backend/docker-compose.yaml index 1375b7f9c03c..55f1878ac150 100644 --- a/examples/cors/backend/docker-compose.yaml +++ b/examples/cors/backend/docker-compose.yaml @@ -1,4 +1,4 @@ -version: "3.7" +version: "3.8" services: flask_service: @@ -6,6 +6,8 @@ services: context: ../../shared/flask image: flask_service:python-3.10-slim-bullseye restart: "no" + deploy: + replicas: 0 front-envoy: build: diff --git a/examples/cors/frontend/docker-compose.yaml b/examples/cors/frontend/docker-compose.yaml index 275a6db9f8d6..57b4ec91f07c 100644 --- a/examples/cors/frontend/docker-compose.yaml +++ b/examples/cors/frontend/docker-compose.yaml @@ -1,4 +1,4 @@ -version: "3.7" +version: "3.8" services: flask_service: @@ -6,6 +6,8 @@ services: context: ../../shared/flask image: flask_service:python-3.10-slim-bullseye restart: "no" + deploy: + replicas: 0 front-envoy: build: diff --git a/examples/csrf/crosssite/docker-compose.yml b/examples/csrf/crosssite/docker-compose.yml index 69e102a1d7f5..391d36db5b4c 100644 --- a/examples/csrf/crosssite/docker-compose.yml +++ b/examples/csrf/crosssite/docker-compose.yml @@ -1,4 +1,4 @@ -version: '3.7' +version: '3.8' services: flask_service: @@ -6,6 +6,8 @@ services: context: ../../shared/flask image: flask_service:python-3.10-slim-bullseye restart: "no" + deploy: + replicas: 0 front-envoy: build: diff --git a/examples/csrf/samesite/docker-compose.yml b/examples/csrf/samesite/docker-compose.yml index b9942945233e..c5a6b28dc81c 100644 --- a/examples/csrf/samesite/docker-compose.yml +++ b/examples/csrf/samesite/docker-compose.yml @@ -1,4 +1,4 @@ -version: '3.7' +version: '3.8' services: flask_service: @@ -6,6 +6,8 @@ services: context: ../../shared/flask image: flask_service:python-3.10-slim-bullseye restart: "no" + deploy: + replicas: 0 front-envoy: build: diff --git a/examples/double-proxy/docker-compose.yaml b/examples/double-proxy/docker-compose.yaml index c92885c56593..84bd26193ac3 100644 --- a/examples/double-proxy/docker-compose.yaml +++ b/examples/double-proxy/docker-compose.yaml @@ -1,4 +1,4 @@ -version: "3.7" +version: "3.8" services: flask_service: @@ -6,6 +6,8 @@ services: context: ../shared/flask image: flask_service:python-3.10-slim-bullseye restart: "no" + deploy: + replicas: 0 proxy-frontend: build: diff --git a/examples/dynamic-config-cp/docker-compose.yaml b/examples/dynamic-config-cp/docker-compose.yaml index 1219726e6d3a..8b77f1b50e51 100644 --- a/examples/dynamic-config-cp/docker-compose.yaml +++ b/examples/dynamic-config-cp/docker-compose.yaml @@ -1,4 +1,4 @@ -version: "3.7" +version: "3.8" services: proxy: diff --git a/examples/dynamic-config-fs/docker-compose.yaml b/examples/dynamic-config-fs/docker-compose.yaml index 1df3161e59f0..4023611185c2 100644 --- a/examples/dynamic-config-fs/docker-compose.yaml +++ b/examples/dynamic-config-fs/docker-compose.yaml @@ -1,4 +1,4 @@ -version: "3.7" +version: "3.8" services: proxy: diff --git a/examples/ext_authz/docker-compose.yaml b/examples/ext_authz/docker-compose.yaml index a33aa97ada4c..ce6e231b9cab 100644 --- a/examples/ext_authz/docker-compose.yaml +++ b/examples/ext_authz/docker-compose.yaml @@ -1,4 +1,4 @@ -version: "3.7" +version: "3.8" services: flask_service: @@ -6,6 +6,8 @@ services: context: ../shared/flask image: flask_service:python-3.10-slim-bullseye restart: "no" + deploy: + replicas: 0 front-envoy: build: diff --git a/examples/fault-injection/docker-compose.yaml b/examples/fault-injection/docker-compose.yaml index 7d933eac2eb8..b867795d0622 100644 --- a/examples/fault-injection/docker-compose.yaml +++ b/examples/fault-injection/docker-compose.yaml @@ -1,4 +1,4 @@ -version: "3.7" +version: "3.8" services: envoy: build: @@ -7,15 +7,9 @@ services: command: /usr/local/bin/envoy -c /etc/envoy.yaml volumes: - ./runtime:/srv/runtime - networks: - - envoymesh ports: - 9211:9211 backend: image: kennethreitz/httpbin@sha256:2c7abc4803080c22928265744410173b6fea3b898872c01c5fd0f0f9df4a59fb - networks: - - envoymesh ports: - 8080:80 -networks: - envoymesh: {} diff --git a/examples/front-proxy/docker-compose.yaml b/examples/front-proxy/docker-compose.yaml index efe8925b7135..971c75033de0 100644 --- a/examples/front-proxy/docker-compose.yaml +++ b/examples/front-proxy/docker-compose.yaml @@ -1,4 +1,4 @@ -version: "3.7" +version: "3.8" services: # base images @@ -7,12 +7,16 @@ services: context: ../shared/flask image: flask_service:python-3.10-slim-bullseye restart: "no" + deploy: + replicas: 0 tracing: build: context: ../shared/tracing image: envoyproxy:tracing restart: "no" + deploy: + replicas: 0 # front-proxy front-envoy: diff --git a/examples/grpc-bridge/docker-compose-protos.yaml b/examples/grpc-bridge/docker-compose-protos.yaml index d21ca8bc5a24..7b3ada55dfa4 100644 --- a/examples/grpc-bridge/docker-compose-protos.yaml +++ b/examples/grpc-bridge/docker-compose-protos.yaml @@ -1,4 +1,4 @@ -version: "3.7" +version: "3.8" # This is the conversion from a script to a dockerized version of the script # https://github.com/envoyproxy/envoy/blob/main/examples/grpc-bridge/service/script/gen diff --git a/examples/grpc-bridge/docker-compose.yaml b/examples/grpc-bridge/docker-compose.yaml index 7d6db81d6a35..d4bde502d48d 100644 --- a/examples/grpc-bridge/docker-compose.yaml +++ b/examples/grpc-bridge/docker-compose.yaml @@ -1,4 +1,4 @@ -version: "3.7" +version: "3.8" services: diff --git a/examples/gzip/docker-compose.yaml b/examples/gzip/docker-compose.yaml index 6ccafb201e00..f06e9c4960d7 100644 --- a/examples/gzip/docker-compose.yaml +++ b/examples/gzip/docker-compose.yaml @@ -1,4 +1,4 @@ -version: "3.7" +version: "3.8" services: flask_service: @@ -6,6 +6,8 @@ services: context: ../shared/flask image: flask_service:python-3.10-slim-bullseye restart: "no" + deploy: + replicas: 0 envoy-stats: build: diff --git a/examples/jaeger-native-tracing/docker-compose.yaml b/examples/jaeger-native-tracing/docker-compose.yaml index b32334680f87..33e4a8982b70 100644 --- a/examples/jaeger-native-tracing/docker-compose.yaml +++ b/examples/jaeger-native-tracing/docker-compose.yaml @@ -1,4 +1,4 @@ -version: "3.7" +version: "3.8" services: # base images @@ -7,12 +7,16 @@ services: context: ../shared/flask image: flask_service:python-3.10-slim-bullseye restart: "no" + deploy: + replicas: 0 tracing: build: context: ../shared/tracing image: envoyproxy:tracing restart: "no" + deploy: + replicas: 0 # jaeger front-envoy: diff --git a/examples/jaeger-tracing/docker-compose.yaml b/examples/jaeger-tracing/docker-compose.yaml index 457440c0f54d..2cdbe309aca6 100644 --- a/examples/jaeger-tracing/docker-compose.yaml +++ b/examples/jaeger-tracing/docker-compose.yaml @@ -1,4 +1,4 @@ -version: "3.7" +version: "3.8" services: # base images @@ -7,12 +7,16 @@ services: context: ../shared/flask image: flask_service:python-3.10-slim-bullseye restart: "no" + deploy: + replicas: 0 tracing: build: context: ../shared/tracing image: envoyproxy:tracing restart: "no" + deploy: + replicas: 0 # jaeger front-envoy: diff --git a/examples/load-reporting-service/docker-compose.yaml b/examples/load-reporting-service/docker-compose.yaml index 41b26fc21f3d..85038d4d4ad3 100644 --- a/examples/load-reporting-service/docker-compose.yaml +++ b/examples/load-reporting-service/docker-compose.yaml @@ -1,4 +1,4 @@ -version: '3.7' +version: '3.8' services: flask_service: @@ -6,6 +6,8 @@ services: context: ../shared/flask image: flask_service:python-3.10-slim-bullseye restart: "no" + deploy: + replicas: 0 envoy: build: diff --git a/examples/local_ratelimit/docker-compose.yaml b/examples/local_ratelimit/docker-compose.yaml index 7150a51e610a..1fc831487202 100644 --- a/examples/local_ratelimit/docker-compose.yaml +++ b/examples/local_ratelimit/docker-compose.yaml @@ -1,4 +1,4 @@ -version: "3.7" +version: "3.8" services: envoy-stat: build: diff --git a/examples/locality-load-balancing/docker-compose.yaml b/examples/locality-load-balancing/docker-compose.yaml index 4bc9508b7b48..8d7bad8df1db 100644 --- a/examples/locality-load-balancing/docker-compose.yaml +++ b/examples/locality-load-balancing/docker-compose.yaml @@ -1,4 +1,4 @@ -version: "3.7" +version: "3.8" services: flask_service: @@ -6,6 +6,8 @@ services: context: ../shared/flask image: flask_service:python-3.10-slim-bullseye restart: "no" + deploy: + replicas: 0 client-envoy: build: diff --git a/examples/lua/docker-compose.yaml b/examples/lua/docker-compose.yaml index f1d36fba7339..a02575515898 100644 --- a/examples/lua/docker-compose.yaml +++ b/examples/lua/docker-compose.yaml @@ -1,12 +1,10 @@ -version: "3.7" +version: "3.8" services: proxy: build: context: . dockerfile: Dockerfile-proxy - networks: - - envoymesh ports: - "8000:8000" @@ -14,10 +12,5 @@ services: build: context: . dockerfile: Dockerfile-web-service - networks: - - envoymesh ports: - "8080:80" - -networks: - envoymesh: {} diff --git a/examples/mysql/docker-compose.yaml b/examples/mysql/docker-compose.yaml index 42a880eac877..5a795a9f009e 100644 --- a/examples/mysql/docker-compose.yaml +++ b/examples/mysql/docker-compose.yaml @@ -1,4 +1,4 @@ -version: "3.7" +version: "3.8" services: proxy: diff --git a/examples/postgres/docker-compose.yaml b/examples/postgres/docker-compose.yaml index ebfcfc6cc5eb..f4022bb02592 100644 --- a/examples/postgres/docker-compose.yaml +++ b/examples/postgres/docker-compose.yaml @@ -1,4 +1,4 @@ -version: "3.7" +version: "3.8" services: proxy: diff --git a/examples/redis/docker-compose.yaml b/examples/redis/docker-compose.yaml index 8dc223a2f5d2..852216a063a6 100644 --- a/examples/redis/docker-compose.yaml +++ b/examples/redis/docker-compose.yaml @@ -1,4 +1,4 @@ -version: "3.7" +version: "3.8" services: proxy: diff --git a/examples/skywalking-tracing/docker-compose.yaml b/examples/skywalking-tracing/docker-compose.yaml index a418cfcb9c67..9bdd679059d8 100644 --- a/examples/skywalking-tracing/docker-compose.yaml +++ b/examples/skywalking-tracing/docker-compose.yaml @@ -1,4 +1,4 @@ -version: "3.7" +version: "3.8" services: # base images @@ -7,12 +7,16 @@ services: context: ../shared/flask image: flask_service:python-3.10-slim-bullseye restart: "no" + deploy: + replicas: 0 tracing: build: context: ../shared/tracing image: envoyproxy:tracing restart: "no" + deploy: + replicas: 0 # Front envoy. front-envoy: diff --git a/examples/tls-inspector/docker-compose.yaml b/examples/tls-inspector/docker-compose.yaml index 879aa860d466..038630806a32 100644 --- a/examples/tls-inspector/docker-compose.yaml +++ b/examples/tls-inspector/docker-compose.yaml @@ -1,4 +1,4 @@ -version: "3.7" +version: "3.8" services: tls-inspector: diff --git a/examples/tls-sni/docker-compose.yaml b/examples/tls-sni/docker-compose.yaml index a76732c16195..bd4304b6f93d 100644 --- a/examples/tls-sni/docker-compose.yaml +++ b/examples/tls-sni/docker-compose.yaml @@ -1,4 +1,4 @@ -version: "3.7" +version: "3.8" services: proxy: diff --git a/examples/tls/docker-compose.yaml b/examples/tls/docker-compose.yaml index 46b9a41f14c9..dee5dffa0872 100644 --- a/examples/tls/docker-compose.yaml +++ b/examples/tls/docker-compose.yaml @@ -1,4 +1,4 @@ -version: "3.7" +version: "3.8" services: proxy-https-to-http: diff --git a/examples/udp/docker-compose.yaml b/examples/udp/docker-compose.yaml index fa17ea189304..33d32b9d40e6 100644 --- a/examples/udp/docker-compose.yaml +++ b/examples/udp/docker-compose.yaml @@ -1,4 +1,4 @@ -version: "3.7" +version: "3.8" services: testing: diff --git a/examples/vrp-litmus/docker-compose.yaml b/examples/vrp-litmus/docker-compose.yaml index db11603fa012..490a10f9d626 100644 --- a/examples/vrp-litmus/docker-compose.yaml +++ b/examples/vrp-litmus/docker-compose.yaml @@ -1,4 +1,4 @@ -version: "3.7" +version: "3.8" services: vrp: @@ -8,10 +8,5 @@ services: environment: ENVOY_EDGE_EXTRA_ARGS: "" ENVOY_ORIGIN_EXTRA_ARGS: "" - networks: - - envoymesh ports: - "10000:10000" - -networks: - envoymesh: {} diff --git a/examples/vrp-local/docker-compose.yaml b/examples/vrp-local/docker-compose.yaml index db11603fa012..490a10f9d626 100644 --- a/examples/vrp-local/docker-compose.yaml +++ b/examples/vrp-local/docker-compose.yaml @@ -1,4 +1,4 @@ -version: "3.7" +version: "3.8" services: vrp: @@ -8,10 +8,5 @@ services: environment: ENVOY_EDGE_EXTRA_ARGS: "" ENVOY_ORIGIN_EXTRA_ARGS: "" - networks: - - envoymesh ports: - "10000:10000" - -networks: - envoymesh: {} diff --git a/examples/wasm-cc/docker-compose-wasm.yaml b/examples/wasm-cc/docker-compose-wasm.yaml index b7214da955f7..dff0c2b68448 100644 --- a/examples/wasm-cc/docker-compose-wasm.yaml +++ b/examples/wasm-cc/docker-compose-wasm.yaml @@ -1,4 +1,4 @@ -version: "3.7" +version: "3.8" services: wasm_compile_update: diff --git a/examples/wasm-cc/docker-compose.yaml b/examples/wasm-cc/docker-compose.yaml index 948de012b98b..3330e829af49 100644 --- a/examples/wasm-cc/docker-compose.yaml +++ b/examples/wasm-cc/docker-compose.yaml @@ -1,4 +1,4 @@ -version: '3.7' +version: '3.8' services: proxy: @@ -7,8 +7,6 @@ services: dockerfile: Dockerfile-proxy depends_on: - web_service - networks: - - envoymesh ports: - "8000:8000" @@ -16,8 +14,3 @@ services: build: context: . dockerfile: Dockerfile-web-service - networks: - - envoymesh - -networks: - envoymesh: {} diff --git a/examples/websocket/docker-compose.yaml b/examples/websocket/docker-compose.yaml index 14cf5f983e4e..e7cf16719ad3 100644 --- a/examples/websocket/docker-compose.yaml +++ b/examples/websocket/docker-compose.yaml @@ -1,4 +1,4 @@ -version: "3.7" +version: "3.8" services: proxy-ws: diff --git a/examples/win32-front-proxy/docker-compose.yaml b/examples/win32-front-proxy/docker-compose.yaml index 5c5b31adeb32..3b4228141c6e 100644 --- a/examples/win32-front-proxy/docker-compose.yaml +++ b/examples/win32-front-proxy/docker-compose.yaml @@ -1,12 +1,10 @@ -version: "3.7" +version: "3.8" services: front-envoy: build: context: . dockerfile: Dockerfile-frontenvoy - networks: - - envoymesh ports: - "8080:8080" - "8443:8443" @@ -16,8 +14,6 @@ services: build: context: . dockerfile: Dockerfile-service - networks: - - envoymesh environment: - SERVICE_NAME=1 @@ -25,10 +21,5 @@ services: build: context: . dockerfile: Dockerfile-service - networks: - - envoymesh environment: - SERVICE_NAME=2 - -networks: - envoymesh: {} diff --git a/examples/zipkin-tracing/docker-compose.yaml b/examples/zipkin-tracing/docker-compose.yaml index ed39c5988a6e..fcd9e5ea8a64 100644 --- a/examples/zipkin-tracing/docker-compose.yaml +++ b/examples/zipkin-tracing/docker-compose.yaml @@ -1,4 +1,4 @@ -version: "3.7" +version: "3.8" services: # base images @@ -7,12 +7,16 @@ services: context: ../shared/flask image: flask_service:python-3.10-slim-bullseye restart: "no" + deploy: + replicas: 0 tracing: build: context: ../shared/tracing image: envoyproxy:tracing restart: "no" + deploy: + replicas: 0 # zipkin front-envoy: