| { |
| "node": { |
| "id": "{{ .nodeID }}", |
| "cluster": "{{ .cluster }}" |
| }, |
| "admin": { |
| "access_log_path": "/dev/null", |
| "address": { |
| "socket_address": { |
| "address": "{{ .localhost }}", |
| "port_value": {{ .adminPort }} |
| } |
| } |
| }, |
| "static_resources": { |
| "clusters": [ |
| { |
| "name": "prometheus_stats", |
| "type": "STATIC", |
| "connect_timeout": "0.250s", |
| "lb_policy": "ROUND_ROBIN", |
| "load_assignment": { |
| "cluster_name": "prometheus_stats", |
| "endpoints": [{ |
| "lb_endpoints": [{ |
| "endpoint": { |
| "address":{ |
| "socket_address": { |
| "address": "{{ .localhost }}", |
| "port_value": {{ .adminPort }} |
| } |
| } |
| } |
| }] |
| }] |
| } |
| } |
| ], |
| "listeners":[ |
| { |
| "address": { |
| "socket_address": { |
| "protocol": "TCP", |
| "address": "0.0.0.0", |
| "port_value": {{ .listenerPort }} |
| } |
| }, |
| "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", |
| "codec_type": "AUTO", |
| "stat_prefix": "stats", |
| "route_config": { |
| "virtual_hosts": [ |
| { |
| "name": "backend", |
| "domains": [ |
| "*" |
| ], |
| "routes": [ |
| { |
| "match": { |
| "prefix": "/stats/prometheus" |
| }, |
| "route": { |
| "cluster": "prometheus_stats" |
| } |
| } |
| ] |
| } |
| ] |
| }, |
| "http_filters": [{ |
| "name": "envoy.filters.http.router", |
| "typed_config": { |
| "@type": "type.googleapis.com/envoy.extensions.filters.http.router.v3.Router" |
| } |
| }] |
| } |
| } |
| ] |
| } |
| ] |
| } |
| ] |
| } |
| } |