Skip to content

Instantly share code, notes, and snippets.

@dln
Created June 3, 2021 20:31
Show Gist options
  • Save dln/e9b9d4b1bb02111461e6fc923dc353a9 to your computer and use it in GitHub Desktop.
Save dln/e9b9d4b1bb02111461e6fc923dc353a9 to your computer and use it in GitHub Desktop.
Minimal envoy config with static endpoints
static_resources:
listeners:
- name: http
address:
socket_address: { address: 0.0.0.0, port_value: 8080 }
filter_chains:
- filters:
- name: envoy.filters.network.http_connection_manager
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
stat_prefix: svc
codec_type: AUTO
route_config:
name: local_route
virtual_hosts:
- name: local_service
domains: ["*"]
routes:
- match: { prefix: "/" }
route: { cluster: service }
http_filters:
- name: envoy.filters.http.router
clusters:
- name: service
connect_timeout: 0.2s
type: static
lb_policy: random
common_lb_config:
healthy_panic_threshold:
value: 0 # disable panic mode (instead 503 when no endpoints are healthy)
health_checks:
- timeout: 1s
interval: 2s
unhealthy_threshold: 2
healthy_threshold: 1
http_health_check:
path: "/"
load_assignment:
cluster_name: service
endpoints:
- lb_endpoints:
- endpoint: { address: { socket_address: { address: 127.0.0.1, port_value: 8081 }}}
- endpoint: { address: { socket_address: { address: 127.0.0.1, port_value: 8082 }}}
- endpoint: { address: { socket_address: { address: 127.0.0.1, port_value: 8083 }}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment