Created
February 2, 2019 06:43
-
-
Save DavadDi/be65927559c4d9cef023cf1e63918079 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# cat /var/lib/istio/envoy/envoy_bootstrap_tmpl.json | |
{ | |
"node": { | |
"id": "{{ .nodeID }}", | |
"cluster": "{{ .cluster }}", | |
{{ if .zone }} | |
"locality": { | |
"zone": "{{ .zone }}" | |
}, | |
{{ end }} | |
"metadata": {{ .meta_json_str }} | |
}, | |
"stats_config": { | |
"use_all_default_tags": false, | |
"stats_tags": [{ | |
"tag_name": "cluster_name", | |
"regex": "^cluster\\.((.+?(\\..+?\\.svc\\.cluster\\.local)?)\\.)" | |
}, | |
{ | |
"tag_name": "tcp_prefix", | |
"regex": "^tcp\\.((.*?)\\.)\\w+?$" | |
}, | |
{ | |
"tag_name": "response_code", | |
"regex": "_rq(_(\\d{3}))$" | |
}, | |
{ | |
"tag_name": "response_code_class", | |
"regex": "_rq(_(\\dxx))$" | |
}, | |
{ | |
"tag_name": "http_conn_manager_listener_prefix", | |
"regex": "^listener(?=\\.).*?\\.http\\.(((?:[_.[:digit:]]*|[_\\[\\]aAbBcCdDeEfF[:digit:]]*))\\.)" | |
}, | |
{ | |
"tag_name": "http_conn_manager_prefix", | |
"regex": "^http\\.(((?:[_.[:digit:]]*|[_\\[\\]aAbBcCdDeEfF[:digit:]]*))\\.)" | |
}, | |
{ | |
"tag_name": "listener_address", | |
"regex": "^listener\\.(((?:[_.[:digit:]]*|[_\\[\\]aAbBcCdDeEfF[:digit:]]*))\\.)" | |
} | |
] | |
}, | |
"admin": { | |
"access_log_path": "/dev/null", | |
"address": { | |
"socket_address": { | |
"address": "127.0.0.1", | |
"port_value": 15000 | |
} | |
} | |
}, | |
"dynamic_resources": { | |
"lds_config": { | |
"ads": {} | |
}, | |
"cds_config": { | |
"ads": {} | |
}, | |
"ads_config": { | |
"api_type": "GRPC", | |
"refresh_delay": "{{ .refresh_delay }}", | |
"grpc_services": [ | |
{ | |
"envoy_grpc": { | |
"cluster_name": "xds-grpc" | |
} | |
} | |
] | |
} | |
}, | |
"static_resources": { | |
"clusters": [ | |
{ | |
"name": "prometheus_stats", | |
"type": "STATIC", | |
"connect_timeout": "0.250s", | |
"lb_policy": "ROUND_ROBIN", | |
"hosts": [{ | |
"socket_address": { | |
"protocol": "TCP", | |
"address": "127.0.0.1", | |
"port_value": 15000, | |
} | |
}], | |
}, | |
{ | |
"name": "xds-grpc", | |
"type": "STRICT_DNS", | |
"connect_timeout": "{{ .connect_timeout }}", | |
"lb_policy": "ROUND_ROBIN", | |
{{ if eq .config.ControlPlaneAuthPolicy 1 }} | |
"tls_context": { | |
"common_tls_context": { | |
"alpn_protocols": ["h2"], | |
"tls_certificates": [{ | |
"certificate_chain": { | |
"filename": "/etc/certs/cert-chain.pem" | |
}, | |
"private_key": { | |
"filename": "/etc/certs/key.pem" | |
} | |
}], | |
"validation_context": { | |
"trusted_ca": { | |
"filename": "/etc/certs/root-cert.pem" | |
}, | |
"verify_subject_alt_name": [ | |
{{- range $a, $s := .pilot_SAN }} | |
"{{$s}}" | |
{{- end}} | |
] | |
} | |
} | |
}, | |
{{ end }} | |
"hosts": [ | |
{ | |
"socket_address": {{ .pilot_grpc_address }} | |
} | |
], | |
"circuit_breakers": { | |
"thresholds": [ | |
{ | |
"priority": "DEFAULT", | |
"max_connections": 100000, | |
"max_pending_requests": 100000, | |
"max_requests": 100000 | |
}, | |
{ | |
"priority": "HIGH", | |
"max_connections": 100000, | |
"max_pending_requests": 100000, | |
"max_requests": 100000 | |
}] | |
}, | |
"upstream_connection_options": { | |
"tcp_keepalive": { | |
"keepalive_time": 300 | |
} | |
}, | |
"http2_protocol_options": { } | |
} | |
{{ if .zipkin }} | |
, | |
{ | |
"name": "zipkin", | |
"type": "STRICT_DNS", | |
"connect_timeout": "1s", | |
"lb_policy": "ROUND_ROBIN", | |
"hosts": [ | |
{ | |
"socket_address": {{ .zipkin }} | |
} | |
] | |
} | |
{{ end }} | |
], | |
"listeners":[ | |
{ | |
"address": { | |
"socket_address": { | |
"protocol": "TCP", | |
"address": "0.0.0.0", | |
"port_value": 15090, | |
} | |
}, | |
"filter_chains": [{ | |
"filters": [{ | |
"name": "envoy.http_connection_manager", | |
"config": { | |
"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.router" | |
} | |
} | |
}] | |
}], | |
}, | |
], | |
}, | |
{{ if .zipkin }} | |
"tracing": { | |
"http": { | |
"name": "envoy.zipkin", | |
"config": { | |
"collector_cluster": "zipkin" | |
} | |
} | |
}, | |
{{ end }} | |
{{ if .statsd }} | |
"stats_sinks": [ | |
{ | |
"name": "envoy.statsd", | |
"config": { | |
"address": { | |
"socket_address": {{ .statsd }} | |
} | |
} | |
} | |
] | |
{{ end }} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment