Skip to content

Instantly share code, notes, and snippets.

@kyessenov
Created January 12, 2022 19:42
Show Gist options
  • Save kyessenov/e5fdfb302ac38309e00f2ab56703fa9d to your computer and use it in GitHub Desktop.
Save kyessenov/e5fdfb302ac38309e00f2ab56703fa9d to your computer and use it in GitHub Desktop.
static_resources:
listeners:
- address:
socket_address:
address: 0.0.0.0
port_value: 8081
traffic_direction: INBOUND
filter_chains:
- filters:
- name: inbound-http-proxy
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
codec_type: auto
stat_prefix: ingress_http
route_config:
name: local_route
virtual_hosts:
- name: backend
domains:
- "*"
routes:
- match:
prefix: "/"
route:
cluster: echo
timeout: 0s
rate_limits:
- actions:
- generic_key:
descriptor_key: service
descriptor_value: test
http_filters:
- name: ratelimit
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.http.local_ratelimit.v3.LocalRateLimit
stat_prefix: rate_limit
token_bucket:
max_tokens: 10000
tokens_per_fill: 10000
fill_interval: 10s
filter_enabled:
runtime_key: local_rate_limit_enabled
default_value: { numerator: 100, denominator: HUNDRED }
filter_enforced:
runtime_key: local_rate_limit_enforced
default_value: { numerator: 100, denominator: HUNDRED }
descriptors:
- entries:
- key: service
value: test
token_bucket:
max_tokens: 100
tokens_per_fill: 100
fill_interval: 10s
- name: envoy.filters.http.router
clusters:
- name: echo
connect_timeout: 1s
type: STATIC
load_assignment:
cluster_name: echo
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: 127.0.0.1
port_value: 8082
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment