Spaces:
Sleeping
Sleeping
Create envoy.yaml
Browse files- envoy.yaml +52 -0
envoy.yaml
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
static_resources:
|
| 2 |
+
listeners:
|
| 3 |
+
- name: listener_h2c_or_h1
|
| 4 |
+
address:
|
| 5 |
+
socket_address: { address: 0.0.0.0, port_value: 7860 } # start.sh přepíše na $PORT
|
| 6 |
+
filter_chains:
|
| 7 |
+
- filters:
|
| 8 |
+
- name: envoy.filters.network.http_connection_manager
|
| 9 |
+
typed_config:
|
| 10 |
+
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
|
| 11 |
+
stat_prefix: local_hcm
|
| 12 |
+
codec_type: AUTO # přijme HTTP/1.1 i h2c (curl, healthcheck i gRPC)
|
| 13 |
+
http2_protocol_options: {}
|
| 14 |
+
route_config:
|
| 15 |
+
name: local_route
|
| 16 |
+
virtual_hosts:
|
| 17 |
+
- name: backend
|
| 18 |
+
domains: ["*"]
|
| 19 |
+
routes:
|
| 20 |
+
# Zdraví (jednoduchý 200 OK, aby HF healthcheck nepadal)
|
| 21 |
+
- match: { prefix: "/healthz" }
|
| 22 |
+
direct_response:
|
| 23 |
+
status: 200
|
| 24 |
+
body: { inline_string: "ok\n" }
|
| 25 |
+
# Přepošli vše ostatní do gRPC serveru (HTTP/2 upstream)
|
| 26 |
+
- match: { prefix: "/" }
|
| 27 |
+
route:
|
| 28 |
+
cluster: dt_grpc
|
| 29 |
+
timeout: 0s
|
| 30 |
+
http_filters:
|
| 31 |
+
- name: envoy.filters.http.router
|
| 32 |
+
typed_config:
|
| 33 |
+
"@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
|
| 34 |
+
|
| 35 |
+
clusters:
|
| 36 |
+
- name: dt_grpc
|
| 37 |
+
type: STATIC
|
| 38 |
+
load_assignment:
|
| 39 |
+
cluster_name: dt_grpc
|
| 40 |
+
endpoints:
|
| 41 |
+
- lb_endpoints:
|
| 42 |
+
- endpoint:
|
| 43 |
+
address:
|
| 44 |
+
socket_address:
|
| 45 |
+
address: 127.0.0.1
|
| 46 |
+
port_value: 7859 # start.sh přepíše pokud změníš GRPC_PORT
|
| 47 |
+
# Upstream do gRPC serveru = HTTP/2 (bez TLS, lokální loopback)
|
| 48 |
+
http2_protocol_options: {}
|
| 49 |
+
|
| 50 |
+
admin:
|
| 51 |
+
address:
|
| 52 |
+
socket_address: { address: 127.0.0.1, port_value: 9901 }
|