Skip to content

Commit

Permalink
xds: use a dedicated listener port for envoy proxy readiness (#5197)
Browse files Browse the repository at this point in the history
* build ready listener

Signed-off-by: zirain <[email protected]>

* release-notes

Signed-off-by: zirain <[email protected]>

* fix gen

Signed-off-by: zirain <[email protected]>

* fix gen

Signed-off-by: zirain <[email protected]>

* remove listener when prometheus is disabled

Signed-off-by: zirain <[email protected]>

* use 500 instead of 200 in DirectResponse

Signed-off-by: zirain <[email protected]>

* gen

Signed-off-by: zirain <[email protected]>

---------

Signed-off-by: zirain <[email protected]>
  • Loading branch information
zirain authored Feb 12, 2025
1 parent 662d365 commit c1e18b2
Show file tree
Hide file tree
Showing 442 changed files with 3,262 additions and 812 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ envoyProxyForGatewayClass:
resource_api_version: V3
static_resources:
listeners:
- name: envoy-gateway-proxy-ready-0.0.0.0-19001
- name: envoy-gateway-proxy-stats-0.0.0.0-19001
address:
socket_address:
address: '0.0.0.0'
Expand All @@ -51,7 +51,7 @@ envoyProxyForGatewayClass:
- name: envoy.filters.network.http_connection_manager
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
stat_prefix: eg-ready-http
stat_prefix: eg-stats-http
normalize_path: true
route_config:
name: local_route
Expand All @@ -68,14 +68,6 @@ envoyProxyForGatewayClass:
route:
cluster: prometheus_stats
http_filters:
- name: envoy.filters.http.health_check
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.http.health_check.v3.HealthCheck
pass_through_mode: false
headers:
- name: ":path"
string_match:
exact: /ready
- name: envoy.filters.http.router
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
Expand Down Expand Up @@ -670,14 +662,6 @@ xds:
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
httpFilters:
- name: envoy.filters.http.health_check
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.health_check.v3.HealthCheck
headers:
- name: :path
stringMatch:
exact: /ready
passThroughMode: false
- name: envoy.filters.http.router
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
Expand All @@ -696,8 +680,8 @@ xds:
path: /stats/prometheus
route:
cluster: prometheus_stats
statPrefix: eg-ready-http
name: envoy-gateway-proxy-ready-0.0.0.0-19001
statPrefix: eg-stats-http
name: envoy-gateway-proxy-stats-0.0.0.0-19001
- '@type': type.googleapis.com/envoy.admin.v3.EndpointsConfigDump
dynamicEndpointConfigs:
- endpointConfig:
Expand Down Expand Up @@ -876,6 +860,44 @@ xds:
type: EDS
- '@type': type.googleapis.com/envoy.admin.v3.ListenersConfigDump
dynamicListeners:
- activeState:
listener:
'@type': type.googleapis.com/envoy.config.listener.v3.Listener
address:
socketAddress:
address: 0.0.0.0
portValue: 19003
filterChains:
- filters:
- name: envoy.filters.network.http_connection_manager
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
httpFilters:
- name: envoy.filters.http.health_check
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.health_check.v3.HealthCheck
headers:
- name: :path
stringMatch:
exact: /ready
passThroughMode: false
- name: envoy.filters.http.router
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
suppressEnvoyHeaders: true
routeConfig:
name: ready_route
virtualHosts:
- domains:
- '*'
name: ready_route
routes:
- directResponse:
status: 500
match:
prefix: /
statPrefix: eg-ready-http
name: envoy-gateway-proxy-ready-0.0.0.0-19003
- activeState:
listener:
'@type': type.googleapis.com/envoy.config.listener.v3.Listener
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,21 +246,6 @@
"typedConfig": {
"@type": "type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager",
"httpFilters": [
{
"name": "envoy.filters.http.health_check",
"typedConfig": {
"@type": "type.googleapis.com/envoy.extensions.filters.http.health_check.v3.HealthCheck",
"headers": [
{
"name": ":path",
"stringMatch": {
"exact": "/ready"
}
}
],
"passThroughMode": false
}
},
{
"name": "envoy.filters.http.router",
"typedConfig": {
Expand Down Expand Up @@ -296,13 +281,13 @@
}
]
},
"statPrefix": "eg-ready-http"
"statPrefix": "eg-stats-http"
}
}
]
}
],
"name": "envoy-gateway-proxy-ready-0.0.0.0-19001"
"name": "envoy-gateway-proxy-stats-0.0.0.0-19001"
}
]
}
Expand Down Expand Up @@ -612,6 +597,78 @@
{
"@type": "type.googleapis.com/envoy.admin.v3.ListenersConfigDump",
"dynamicListeners": [
{
"activeState": {
"listener": {
"@type": "type.googleapis.com/envoy.config.listener.v3.Listener",
"address": {
"socketAddress": {
"address": "0.0.0.0",
"portValue": 19003
}
},
"filterChains": [
{
"filters": [
{
"name": "envoy.filters.network.http_connection_manager",
"typedConfig": {
"@type": "type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager",
"httpFilters": [
{
"name": "envoy.filters.http.health_check",
"typedConfig": {
"@type": "type.googleapis.com/envoy.extensions.filters.http.health_check.v3.HealthCheck",
"headers": [
{
"name": ":path",
"stringMatch": {
"exact": "/ready"
}
}
],
"passThroughMode": false
}
},
{
"name": "envoy.filters.http.router",
"typedConfig": {
"@type": "type.googleapis.com/envoy.extensions.filters.http.router.v3.Router",
"suppressEnvoyHeaders": true
}
}
],
"routeConfig": {
"name": "ready_route",
"virtualHosts": [
{
"domains": [
"*"
],
"name": "ready_route",
"routes": [
{
"directResponse": {
"status": 500
},
"match": {
"prefix": "/"
}
}
]
}
]
},
"statPrefix": "eg-ready-http"
}
}
]
}
],
"name": "envoy-gateway-proxy-ready-0.0.0.0-19003"
}
}
},
{
"activeState": {
"listener": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,6 @@ xds:
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
httpFilters:
- name: envoy.filters.http.health_check
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.health_check.v3.HealthCheck
headers:
- name: :path
stringMatch:
exact: /ready
passThroughMode: false
- name: envoy.filters.http.router
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
Expand All @@ -171,8 +163,8 @@ xds:
path: /stats/prometheus
route:
cluster: prometheus_stats
statPrefix: eg-ready-http
name: envoy-gateway-proxy-ready-0.0.0.0-19001
statPrefix: eg-stats-http
name: envoy-gateway-proxy-stats-0.0.0.0-19001
- '@type': type.googleapis.com/envoy.admin.v3.EndpointsConfigDump
dynamicEndpointConfigs:
- endpointConfig:
Expand Down Expand Up @@ -351,6 +343,44 @@ xds:
type: EDS
- '@type': type.googleapis.com/envoy.admin.v3.ListenersConfigDump
dynamicListeners:
- activeState:
listener:
'@type': type.googleapis.com/envoy.config.listener.v3.Listener
address:
socketAddress:
address: 0.0.0.0
portValue: 19003
filterChains:
- filters:
- name: envoy.filters.network.http_connection_manager
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
httpFilters:
- name: envoy.filters.http.health_check
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.health_check.v3.HealthCheck
headers:
- name: :path
stringMatch:
exact: /ready
passThroughMode: false
- name: envoy.filters.http.router
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
suppressEnvoyHeaders: true
routeConfig:
name: ready_route
virtualHosts:
- domains:
- '*'
name: ready_route
routes:
- directResponse:
status: 500
match:
prefix: /
statPrefix: eg-ready-http
name: envoy-gateway-proxy-ready-0.0.0.0-19003
- activeState:
listener:
'@type': type.googleapis.com/envoy.config.listener.v3.Listener
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,14 +144,6 @@ xds:
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
httpFilters:
- name: envoy.filters.http.health_check
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.health_check.v3.HealthCheck
headers:
- name: :path
stringMatch:
exact: /ready
passThroughMode: false
- name: envoy.filters.http.router
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
Expand All @@ -170,5 +162,5 @@ xds:
path: /stats/prometheus
route:
cluster: prometheus_stats
statPrefix: eg-ready-http
name: envoy-gateway-proxy-ready-0.0.0.0-19001
statPrefix: eg-stats-http
name: envoy-gateway-proxy-stats-0.0.0.0-19001
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,44 @@ xds:
default/eg:
'@type': type.googleapis.com/envoy.admin.v3.ListenersConfigDump
dynamicListeners:
- activeState:
listener:
'@type': type.googleapis.com/envoy.config.listener.v3.Listener
address:
socketAddress:
address: 0.0.0.0
portValue: 19003
filterChains:
- filters:
- name: envoy.filters.network.http_connection_manager
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
httpFilters:
- name: envoy.filters.http.health_check
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.health_check.v3.HealthCheck
headers:
- name: :path
stringMatch:
exact: /ready
passThroughMode: false
- name: envoy.filters.http.router
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
suppressEnvoyHeaders: true
routeConfig:
name: ready_route
virtualHosts:
- domains:
- '*'
name: ready_route
routes:
- directResponse:
status: 500
match:
prefix: /
statPrefix: eg-ready-http
name: envoy-gateway-proxy-ready-0.0.0.0-19003
- activeState:
listener:
'@type': type.googleapis.com/envoy.config.listener.v3.Listener
Expand Down
Loading

0 comments on commit c1e18b2

Please sign in to comment.