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 26 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
d58add2
Add readiness probe as part of translation
davidjumani Dec 24, 2024
ddde2be
remove unecessary routes
davidjumani Jan 2, 2025
f4eb3de
rename listener
davidjumani Jan 2, 2025
f37b820
adding changelog
davidjumani Jan 2, 2025
dda7e65
Merge branch 'main' into fix-readiness-probe
davidjumani Jan 2, 2025
bf2c8d4
udpate godoc
davidjumani Jan 2, 2025
1fabcd7
fix tests
davidjumani Jan 2, 2025
33d8e3d
codegen
davidjumani Jan 2, 2025
29e0f9a
fix bootstrap config
davidjumani Jan 2, 2025
b074b14
add rediness listener to outfiles
davidjumani Jan 2, 2025
470dafc
Adding changelog file to new location
Jan 16, 2025
5b38933
Deleting changelog file from old location
Jan 16, 2025
2d931be
Adding changelog file to new location
Jan 23, 2025
4dfcd3c
Deleting changelog file from old location
Jan 23, 2025
97c7c3e
Adding changelog file to new location
Jan 30, 2025
ec3e7f3
Deleting changelog file from old location
Jan 30, 2025
bfd1272
Adding changelog file to new location
Feb 10, 2025
bdb7cea
Deleting changelog file from old location
Feb 10, 2025
f0909e9
Adding changelog file to new location
Feb 12, 2025
e3e3e2e
Deleting changelog file from old location
Feb 12, 2025
e1072bb
Adding changelog file to new location
Feb 14, 2025
9597331
Deleting changelog file from old location
Feb 14, 2025
2c367d7
Adding changelog file to new location
Feb 17, 2025
90a18a8
Deleting changelog file from old location
Feb 17, 2025
de071a8
Adding changelog file to new location
Feb 18, 2025
7828f6a
Deleting changelog file from old location
Feb 18, 2025
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-beta11/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"
{{- 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