Skip to content

Commit

Permalink
backport to 1.16: examples to use v3 configs (#14125)
Browse files Browse the repository at this point in the history
Backport of PR #13529 and #13503

Signed-off-by: Ryan Northey <ryan@synca.io>
Signed-off-by: Christoph Pakulski <christoph@tetrate.io>

Co-authored-by: phlax <phlax@users.noreply.github.com>
  • Loading branch information
cpakulski and phlax authored Nov 20, 2020
1 parent 41be539 commit ad65af3
Show file tree
Hide file tree
Showing 30 changed files with 56 additions and 55 deletions.
1 change: 1 addition & 0 deletions docs/root/version_history/current.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Minor Behavior Changes
Bug Fixes
---------
*Changes expected to improve the state of the world and are unlikely to have negative effects*
* examples: examples use v3 configs.
* listener: fix crash when disabling or re-enabling listeners due to overload while processing LDS updates.
* proxy_proto: fixed a bug where the wrong downstream address got sent to upstream connections.
* tls: fix read resumption after triggering buffer high-watermark and all remaining request/response bytes are stored in the SSL connection's internal buffers.
Expand Down
4 changes: 2 additions & 2 deletions examples/cors/backend/front-envoy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ static_resources:
- filters:
- name: envoy.filters.network.http_connection_manager
typed_config:
"@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
codec_type: auto
stat_prefix: ingress_http
access_log:
- name: envoy.access_loggers.file
typed_config:
"@type": type.googleapis.com/envoy.config.accesslog.v2.FileAccessLog
"@type": type.googleapis.com/envoy.extensions.access_loggers.file.v3.FileAccessLog
path: /dev/stdout
route_config:
name: local_route
Expand Down
2 changes: 1 addition & 1 deletion examples/cors/backend/service-envoy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ static_resources:
- filters:
- name: envoy.filters.network.http_connection_manager
typed_config:
"@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
codec_type: auto
stat_prefix: ingress_http
route_config:
Expand Down
4 changes: 2 additions & 2 deletions examples/cors/frontend/front-envoy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ static_resources:
- filters:
- name: envoy.filters.network.http_connection_manager
typed_config:
"@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
codec_type: auto
stat_prefix: ingress_http
access_log:
- name: envoy.access_loggers.file
typed_config:
"@type": type.googleapis.com/envoy.config.accesslog.v2.FileAccessLog
"@type": type.googleapis.com/envoy.extensions.access_loggers.file.v3.FileAccessLog
path: /dev/stdout
route_config:
name: local_route
Expand Down
2 changes: 1 addition & 1 deletion examples/cors/frontend/service-envoy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ static_resources:
- filters:
- name: envoy.filters.network.http_connection_manager
typed_config:
"@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
codec_type: auto
stat_prefix: ingress_http
route_config:
Expand Down
4 changes: 2 additions & 2 deletions examples/csrf/crosssite/front-envoy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ static_resources:
- filters:
- name: envoy.filters.network.http_connection_manager
typed_config:
"@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
codec_type: auto
stat_prefix: ingress_http
access_log:
- name: envoy.access_loggers.file
typed_config:
"@type": type.googleapis.com/envoy.config.accesslog.v2.FileAccessLog
"@type": type.googleapis.com/envoy.extensions.access_loggers.file.v3.FileAccessLog
path: "/dev/stdout"
route_config:
name: local_route
Expand Down
4 changes: 2 additions & 2 deletions examples/csrf/samesite/front-envoy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ static_resources:
- filters:
- name: envoy.filters.network.http_connection_manager
typed_config:
"@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
codec_type: auto
stat_prefix: ingress_http
access_log:
- name: envoy.access_loggers.file
typed_config:
"@type": type.googleapis.com/envoy.config.accesslog.v2.FileAccessLog
"@type": type.googleapis.com/envoy.extensions.access_loggers.file.v3.FileAccessLog
path: "/dev/stdout"
route_config:
name: local_route
Expand Down
2 changes: 1 addition & 1 deletion examples/csrf/service-envoy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ static_resources:
- filters:
- name: envoy.filters.network.http_connection_manager
typed_config:
"@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
codec_type: auto
stat_prefix: ingress_http
route_config:
Expand Down
2 changes: 1 addition & 1 deletion examples/ext_authz/config/grpc-service/v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ static_resources:
- filters:
- name: envoy.filters.network.http_connection_manager
typed_config:
"@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
codec_type: auto
stat_prefix: ingress_http
route_config:
Expand Down
2 changes: 1 addition & 1 deletion examples/ext_authz/config/grpc-service/v3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ static_resources:
- filters:
- name: envoy.filters.network.http_connection_manager
typed_config:
"@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
codec_type: auto
stat_prefix: ingress_http
route_config:
Expand Down
2 changes: 1 addition & 1 deletion examples/ext_authz/config/http-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ static_resources:
- filters:
- name: envoy.filters.network.http_connection_manager
typed_config:
"@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
codec_type: auto
stat_prefix: ingress_http
route_config:
Expand Down
2 changes: 1 addition & 1 deletion examples/ext_authz/config/opa-service/v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ static_resources:
- filters:
- name: envoy.filters.network.http_connection_manager
typed_config:
"@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
codec_type: auto
stat_prefix: ingress_http
route_config:
Expand Down
6 changes: 3 additions & 3 deletions examples/fault-injection/envoy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ static_resources:
- filters:
- name: envoy.filters.network.http_connection_manager
typed_config:
"@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
codec_type: auto
stat_prefix: ingress_http
access_log:
name: envoy.access_loggers.file
typed_config:
"@type": type.googleapis.com/envoy.config.accesslog.v2.FileAccessLog
"@type": type.googleapis.com/envoy.extensions.access_loggers.file.v3.FileAccessLog
path: /dev/stdout
route_config:
name: local_route
Expand All @@ -30,7 +30,7 @@ static_resources:
http_filters:
- name: envoy.filters.http.fault
typed_config:
"@type": type.googleapis.com/envoy.config.filter.http.fault.v2.HTTPFault
"@type": type.googleapis.com/envoy.extensions.filters.http.fault.v3.HTTPFault
abort:
http_status: 503
percentage:
Expand Down
4 changes: 2 additions & 2 deletions examples/front-proxy/front-envoy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ static_resources:
- filters:
- name: envoy.filters.network.http_connection_manager
typed_config:
"@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
codec_type: auto
stat_prefix: ingress_http
route_config:
Expand Down Expand Up @@ -38,7 +38,7 @@ static_resources:
- filters:
- name: envoy.filters.network.http_connection_manager
typed_config:
"@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
codec_type: auto
stat_prefix: ingress_http
route_config:
Expand Down
2 changes: 1 addition & 1 deletion examples/front-proxy/service-envoy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ static_resources:
- filters:
- name: envoy.filters.network.http_connection_manager
typed_config:
"@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
codec_type: auto
stat_prefix: ingress_http
route_config:
Expand Down
4 changes: 2 additions & 2 deletions examples/grpc-bridge/client/envoy-proxy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ static_resources:
- filters:
- name: envoy.filters.network.http_connection_manager
typed_config:
"@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
codec_type: auto
add_user_agent: true
access_log:
- name: envoy.access_loggers.file
typed_config:
"@type": type.googleapis.com/envoy.config.accesslog.v2.FileAccessLog
"@type": type.googleapis.com/envoy.extensions.access_loggers.file.v3.FileAccessLog
path: "/dev/stdout"
stat_prefix: egress_http
common_http_protocol_options:
Expand Down
4 changes: 2 additions & 2 deletions examples/grpc-bridge/server/envoy-proxy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ static_resources:
- filters:
- name: envoy.filters.network.http_connection_manager
typed_config:
"@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
codec_type: auto
stat_prefix: ingress_http
access_log:
- name: envoy.access_loggers.file
typed_config:
"@type": type.googleapis.com/envoy.config.accesslog.v2.FileAccessLog
"@type": type.googleapis.com/envoy.extensions.access_loggers.file.v3.FileAccessLog
path: "/dev/stdout"
route_config:
name: local_route
Expand Down
4 changes: 2 additions & 2 deletions examples/jaeger-native-tracing/front-envoy-jaeger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ static_resources:
- filters:
- name: envoy.filters.network.http_connection_manager
typed_config:
"@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
generate_request_id: true
tracing:
provider:
name: envoy.tracers.dynamic_ot
typed_config:
"@type": type.googleapis.com/envoy.config.trace.v2.DynamicOtConfig
"@type": type.googleapis.com/envoy.config.trace.v3.DynamicOtConfig
library: /usr/local/lib/libjaegertracing_plugin.so
config:
service_name: front-proxy
Expand Down
6 changes: 3 additions & 3 deletions examples/jaeger-native-tracing/service1-envoy-jaeger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ static_resources:
- filters:
- name: envoy.filters.network.http_connection_manager
typed_config:
"@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
codec_type: auto
stat_prefix: ingress_http
route_config:
Expand Down Expand Up @@ -37,12 +37,12 @@ static_resources:
- filters:
- name: envoy.filters.network.http_connection_manager
typed_config:
"@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
tracing:
provider:
name: envoy.tracers.dynamic_ot
typed_config:
"@type": type.googleapis.com/envoy.config.trace.v2.DynamicOtConfig
"@type": type.googleapis.com/envoy.config.trace.v3.DynamicOtConfig
library: /usr/local/lib/libjaegertracing_plugin.so
config:
service_name: service1
Expand Down
4 changes: 2 additions & 2 deletions examples/jaeger-native-tracing/service2-envoy-jaeger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ static_resources:
- filters:
- name: envoy.filters.network.http_connection_manager
typed_config:
"@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
tracing:
provider:
name: envoy.tracers.dynamic_ot
typed_config:
"@type": type.googleapis.com/envoy.config.trace.v2.DynamicOtConfig
"@type": type.googleapis.com/envoy.config.trace.v3.DynamicOtConfig
library: /usr/local/lib/libjaegertracing_plugin.so
config:
service_name: service2
Expand Down
4 changes: 2 additions & 2 deletions examples/jaeger-tracing/front-envoy-jaeger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ static_resources:
- filters:
- name: envoy.filters.network.http_connection_manager
typed_config:
"@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
generate_request_id: true
tracing:
provider:
name: envoy.tracers.zipkin
typed_config:
"@type": type.googleapis.com/envoy.config.trace.v2.ZipkinConfig
"@type": type.googleapis.com/envoy.config.trace.v3.ZipkinConfig
collector_cluster: jaeger
collector_endpoint: "/api/v2/spans"
shared_span_context: false
Expand Down
8 changes: 4 additions & 4 deletions examples/jaeger-tracing/service1-envoy-jaeger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ static_resources:
- filters:
- name: envoy.filters.network.http_connection_manager
typed_config:
"@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
tracing:
provider:
name: envoy.tracers.zipkin
typed_config:
"@type": type.googleapis.com/envoy.config.trace.v2.ZipkinConfig
"@type": type.googleapis.com/envoy.config.trace.v3.ZipkinConfig
collector_cluster: jaeger
collector_endpoint: "/api/v2/spans"
shared_span_context: false
Expand Down Expand Up @@ -46,12 +46,12 @@ static_resources:
- filters:
- name: envoy.filters.network.http_connection_manager
typed_config:
"@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
tracing:
provider:
name: envoy.tracers.zipkin
typed_config:
"@type": type.googleapis.com/envoy.config.trace.v2.ZipkinConfig
"@type": type.googleapis.com/envoy.config.trace.v3.ZipkinConfig
collector_cluster: jaeger
collector_endpoint: "/api/v2/spans"
shared_span_context: false
Expand Down
4 changes: 2 additions & 2 deletions examples/jaeger-tracing/service2-envoy-jaeger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ static_resources:
- filters:
- name: envoy.filters.network.http_connection_manager
typed_config:
"@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
tracing:
provider:
name: envoy.tracers.zipkin
typed_config:
"@type": type.googleapis.com/envoy.config.trace.v2.ZipkinConfig
"@type": type.googleapis.com/envoy.config.trace.v3.ZipkinConfig
collector_cluster: jaeger
collector_endpoint: "/api/v2/spans"
shared_span_context: false
Expand Down
4 changes: 2 additions & 2 deletions examples/load-reporting-service/service-envoy-w-lrs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ static_resources:
- filters:
- name: envoy.filters.network.http_connection_manager
typed_config:
"@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
codec_type: auto
stat_prefix: ingress_http
route_config:
Expand Down Expand Up @@ -57,7 +57,7 @@ cluster_manager:
load_stats_config:
api_type: GRPC
grpc_services:
envoy_grpc:
envoy_grpc:
cluster_name: load_reporting_cluster
admin:
access_log_path: "/dev/null"
Expand Down
4 changes: 2 additions & 2 deletions examples/lua/envoy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ static_resources:
- filters:
- name: envoy.filters.network.http_connection_manager
typed_config:
"@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
stat_prefix: ingress_http
codec_type: auto
route_config:
Expand All @@ -26,7 +26,7 @@ static_resources:
http_filters:
- name: envoy.filters.http.lua
typed_config:
"@type": type.googleapis.com/envoy.config.filter.http.lua.v2.Lua
"@type": type.googleapis.com/envoy.extensions.filters.http.lua.v3.Lua
inline_code: |
local mylibrary = require("lib.mylibrary")
Expand Down
4 changes: 2 additions & 2 deletions examples/mysql/envoy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ static_resources:
- filters:
- name: envoy.filters.network.mysql_proxy
typed_config:
"@type": type.googleapis.com/envoy.config.filter.network.mysql_proxy.v1alpha1.MySQLProxy
"@type": type.googleapis.com/envoy.extensions.filters.network.mysql_proxy.v3.MySQLProxy
stat_prefix: egress_mysql
- name: envoy.filters.network.tcp_proxy
typed_config:
"@type": type.googleapis.com/envoy.config.filter.network.tcp_proxy.v2.TcpProxy
"@type": type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy
stat_prefix: mysql_tcp
cluster: mysql_cluster

Expand Down
2 changes: 1 addition & 1 deletion examples/redis/envoy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ static_resources:
- filters:
- name: envoy.filters.network.redis_proxy
typed_config:
"@type": type.googleapis.com/envoy.config.filter.network.redis_proxy.v2.RedisProxy
"@type": type.googleapis.com/envoy.extensions.filters.network.redis_proxy.v3.RedisProxy
stat_prefix: egress_redis
settings:
op_timeout: 5s
Expand Down
Loading

0 comments on commit ad65af3

Please sign in to comment.