2021-04-20 10:49:29 +00:00
|
|
|
# https://www.envoyproxy.io/docs/envoy/v1.17.1/configuration/best_practices/edge#configuring-envoy-as-an-edge-proxy
|
|
|
|
# https://github.com/istio/istio/issues/24715
|
|
|
|
apiVersion: v1
|
|
|
|
kind: ConfigMap
|
|
|
|
metadata:
|
2022-04-21 11:57:34 +00:00
|
|
|
name: {{ include "gatewayName" . | trimPrefix "istio-" }}-bootstrap-config
|
2021-04-20 10:49:29 +00:00
|
|
|
namespace: {{ .Release.Namespace }}
|
2021-04-22 10:00:13 +00:00
|
|
|
labels:
|
|
|
|
{{ include "kubezero-lib.labels" . | indent 4 }}
|
2021-04-20 10:49:29 +00:00
|
|
|
data:
|
|
|
|
custom_bootstrap.json: |
|
|
|
|
{
|
|
|
|
"overload_manager": {
|
|
|
|
"actions": [
|
|
|
|
{
|
|
|
|
"name": "envoy.overload_actions.shrink_heap",
|
|
|
|
"triggers": [
|
|
|
|
{
|
|
|
|
"name": "envoy.resource_monitors.fixed_heap",
|
|
|
|
"threshold": {
|
|
|
|
"value": 0.9
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "envoy.overload_actions.stop_accepting_requests",
|
|
|
|
"triggers": [
|
|
|
|
{
|
|
|
|
"name": "envoy.resource_monitors.fixed_heap",
|
|
|
|
"threshold": {
|
|
|
|
"value": 0.99
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"refresh_interval": "0.25s",
|
|
|
|
"resource_monitors": [
|
|
|
|
{
|
|
|
|
"name": "envoy.resource_monitors.fixed_heap",
|
|
|
|
"typed_config": {
|
2021-04-20 14:33:45 +00:00
|
|
|
"@type": "type.googleapis.com/envoy.config.resource_monitor.fixed_heap.v2alpha.FixedHeapConfig",
|
2021-04-20 10:49:29 +00:00
|
|
|
"max_heap_size_bytes": 536870912
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
2021-04-20 14:33:45 +00:00
|
|
|
},
|
|
|
|
"layeredRuntime": {
|
|
|
|
"layers": [
|
|
|
|
{
|
|
|
|
"name": "static_layer_0",
|
|
|
|
"staticLayer": {
|
|
|
|
"overload.global_downstream_max_connections": 50000
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
2021-04-20 10:49:29 +00:00
|
|
|
}
|
|
|
|
}
|