Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Ensure readiness probe relies on translated config #10542

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions changelog/v1.19.0-beta3/fix-readiness-probe.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
changelog:
- type: FIX
issueLink: https://github.com/solo-io/gloo/issues/10541
resolvesIssue: false
description: Fixes a bug where the envoy pod passes the readiness probe before receving the xds config.

Original file line number Diff line number Diff line change
Expand Up @@ -439,45 +439,8 @@ data:
metadata:
role: gloo-kube-gateway-api~{{ $gateway.gatewayNamespace }}~{{ $gateway.gatewayNamespace }}-{{ $gateway.gatewayName | default (include "gloo-gateway.gateway.fullname" .) }}
static_resources:
listeners:
- name: readiness_listener
address:
socket_address: { address: 0.0.0.0, port_value: 8082 }
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
stat_prefix: ingress_http
codec_type: AUTO
route_config:
name: main_route
virtual_hosts:
- name: local_service
domains: ["*"]
routes:
- match:
path: "/ready"
headers:
- name: ":method"
string_match:
exact: GET
route:
cluster: admin_port_cluster
http_filters:
{{- if $gateway.readinessProbe }}
- 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"
exact_match: "/envoy-hc"
nfuden marked this conversation as resolved.
Show resolved Hide resolved
{{- end }}{{/*if $gateway.readinessProbe*/}}
- name: envoy.filters.http.router
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
{{- if $statsConfig.enabled }}
listeners:
- name: prometheus_listener
address:
socket_address:
Expand Down Expand Up @@ -526,6 +489,8 @@ data:
- name: envoy.filters.http.router
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
{{- else}}
listeners: []
{{- end }} {{/* if $gateway.stats.enabled */}}
clusters:
- name: xds_cluster
Expand Down
59 changes: 59 additions & 0 deletions projects/gateway2/setup/testdata/failover-default-diffns-out.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,59 @@ listeners:
upgradeConfigs:
- upgradeType: websocket
name: http
- address:
socketAddress:
address: '::'
ipv4Compat: true
portValue: 8082
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.fault
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.fault.v3.HTTPFault
- name: envoy.filters.http.cors
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.cors.v3.Cors
- name: envoy.filters.http.local_ratelimit
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.local_ratelimit.v3.LocalRateLimit
stage: 3
statPrefix: http_local_ratelimit
- name: envoy.filters.http.grpc_web
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.grpc_web.v3.GrpcWeb
- name: envoy.filters.http.health_check
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.health_check.v3.HealthCheck
headers:
- exactMatch: /envoy-hc
name: :path
passThroughMode: false
- name: io.solo.transformation
typedConfig:
'@type': type.googleapis.com/envoy.api.v2.filter.http.FilterTransformations
- name: envoy.filters.http.csrf
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.csrf.v3.CsrfPolicy
filterEnabled:
defaultValue: {}
- name: envoy.filters.http.router
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
normalizePath: true
rds:
configSource:
ads: {}
resourceApiVersion: V3
routeConfigName: readiness_listener-routes
statPrefix: http
upgradeConfigs:
- upgradeType: websocket
name: readiness_listener
routes:
- ignorePortInHostMatching: true
name: http-routes-14610285773269467959
Expand All @@ -222,3 +275,9 @@ routes:
route:
cluster: kube-svc:gwtest-reviews-8080_gwtest
clusterNotFoundResponseCode: INTERNAL_SERVER_ERROR
- ignorePortInHostMatching: true
name: readiness_listener-routes
virtualHosts:
- domains:
- '*'
name: local_service
59 changes: 59 additions & 0 deletions projects/gateway2/setup/testdata/failover-default-out.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,59 @@ listeners:
upgradeConfigs:
- upgradeType: websocket
name: http
- address:
socketAddress:
address: '::'
ipv4Compat: true
portValue: 8082
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.fault
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.fault.v3.HTTPFault
- name: envoy.filters.http.cors
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.cors.v3.Cors
- name: envoy.filters.http.local_ratelimit
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.local_ratelimit.v3.LocalRateLimit
stage: 3
statPrefix: http_local_ratelimit
- name: envoy.filters.http.grpc_web
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.grpc_web.v3.GrpcWeb
- name: envoy.filters.http.health_check
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.health_check.v3.HealthCheck
headers:
- exactMatch: /envoy-hc
name: :path
passThroughMode: false
- name: io.solo.transformation
typedConfig:
'@type': type.googleapis.com/envoy.api.v2.filter.http.FilterTransformations
- name: envoy.filters.http.csrf
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.csrf.v3.CsrfPolicy
filterEnabled:
defaultValue: {}
- name: envoy.filters.http.router
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
normalizePath: true
rds:
configSource:
ads: {}
resourceApiVersion: V3
routeConfigName: readiness_listener-routes
statPrefix: http
upgradeConfigs:
- upgradeType: websocket
name: readiness_listener
routes:
- ignorePortInHostMatching: true
name: http-routes-14610285773269467959
Expand All @@ -222,3 +275,9 @@ routes:
route:
cluster: kube-svc:gwtest-reviews-8080_gwtest
clusterNotFoundResponseCode: INTERNAL_SERVER_ERROR
- ignorePortInHostMatching: true
name: readiness_listener-routes
virtualHosts:
- domains:
- '*'
name: local_service
59 changes: 59 additions & 0 deletions projects/gateway2/setup/testdata/failover-out.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,59 @@ listeners:
upgradeConfigs:
- upgradeType: websocket
name: http
- address:
socketAddress:
address: '::'
ipv4Compat: true
portValue: 8082
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.fault
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.fault.v3.HTTPFault
- name: envoy.filters.http.cors
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.cors.v3.Cors
- name: envoy.filters.http.local_ratelimit
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.local_ratelimit.v3.LocalRateLimit
stage: 3
statPrefix: http_local_ratelimit
- name: envoy.filters.http.grpc_web
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.grpc_web.v3.GrpcWeb
- name: envoy.filters.http.health_check
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.health_check.v3.HealthCheck
headers:
- exactMatch: /envoy-hc
name: :path
passThroughMode: false
- name: io.solo.transformation
typedConfig:
'@type': type.googleapis.com/envoy.api.v2.filter.http.FilterTransformations
- name: envoy.filters.http.csrf
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.csrf.v3.CsrfPolicy
filterEnabled:
defaultValue: {}
- name: envoy.filters.http.router
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
normalizePath: true
rds:
configSource:
ads: {}
resourceApiVersion: V3
routeConfigName: readiness_listener-routes
statPrefix: http
upgradeConfigs:
- upgradeType: websocket
name: readiness_listener
routes:
- ignorePortInHostMatching: true
name: http-routes-14610285773269467959
Expand All @@ -221,3 +274,9 @@ routes:
route:
cluster: kube-svc:gwtest-reviews-8080_gwtest
clusterNotFoundResponseCode: INTERNAL_SERVER_ERROR
- ignorePortInHostMatching: true
name: readiness_listener-routes
virtualHosts:
- domains:
- '*'
name: local_service
59 changes: 59 additions & 0 deletions projects/gateway2/setup/testdata/happypath-out.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,59 @@ listeners:
upgradeConfigs:
- upgradeType: websocket
name: http
- address:
socketAddress:
address: '::'
ipv4Compat: true
portValue: 8082
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.fault
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.fault.v3.HTTPFault
- name: envoy.filters.http.cors
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.cors.v3.Cors
- name: envoy.filters.http.local_ratelimit
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.local_ratelimit.v3.LocalRateLimit
stage: 3
statPrefix: http_local_ratelimit
- name: envoy.filters.http.grpc_web
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.grpc_web.v3.GrpcWeb
- name: envoy.filters.http.health_check
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.health_check.v3.HealthCheck
headers:
- exactMatch: /envoy-hc
name: :path
passThroughMode: false
- name: io.solo.transformation
typedConfig:
'@type': type.googleapis.com/envoy.api.v2.filter.http.FilterTransformations
- name: envoy.filters.http.csrf
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.csrf.v3.CsrfPolicy
filterEnabled:
defaultValue: {}
- name: envoy.filters.http.router
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
normalizePath: true
rds:
configSource:
ads: {}
resourceApiVersion: V3
routeConfigName: readiness_listener-routes
statPrefix: http
upgradeConfigs:
- upgradeType: websocket
name: readiness_listener
routes:
- ignorePortInHostMatching: true
name: http-routes-14610285773269467959
Expand All @@ -171,3 +224,9 @@ routes:
route:
cluster: kube-svc:gwtest-reviews-8080_gwtest
clusterNotFoundResponseCode: INTERNAL_SERVER_ERROR
- ignorePortInHostMatching: true
name: readiness_listener-routes
virtualHosts:
- domains:
- '*'
name: local_service
Loading