Commit 325beaa
committed
fix: derive the protocol of active health checks from the backend
Envoy sends HTTP health check requests with a codec that is fixed when the
health checker is created, and health check connections are created outside
of the connection pool, so they don't inherit the ALPN protocols that the
pool derives from the backend protocol settings. Envoy Gateway configures
neither, so health checks are sent as HTTP/1.1 and fail against a backend
that speaks HTTP/2 on its health check endpoint, marking all of its
endpoints unhealthy.
Derive both from the backend protocol: `codec_client_type` is set to HTTP2
for backends that use HTTP/2 and to HTTP1 otherwise, and for backends that
use TLS, `tls_options.alpn_protocols` is pinned to the protocol matching the
codec, so the protocol negotiated during the handshake is the one Envoy uses
to send the request. The ALPN isn't pinned when the backend TLS settings ask
for a protocol that the codec can't speak, such as `istio`, since overriding
it would break the handshake. gRPC health checks are always sent over
HTTP/2, so TLS backends get `h2`.
Add `healthCheck.active.http.version` to select the version explicitly, for
backends whose health check endpoint uses a different protocol than their
application endpoint.
Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>
Signed-off-by: Huabing (Robin) Zhao <huabing@tetrate.io>1 parent 2b40195 commit 325beaa
29 files changed
Lines changed: 2487 additions & 4 deletions
File tree
- api/v1alpha1
- charts
- gateway-crds-helm/templates/generated
- gateway-helm/charts/crds/crds/generated
- internal
- gatewayapi
- resource/testdata
- ir
- xds/translator
- testdata
- in/xds-ir
- out/xds-ir
- release-notes/current
- bug_fixes
- new_features
- site/content/en/latest/api
- test/helm/gateway-crds-helm
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
200 | 231 | | |
201 | 232 | | |
202 | 233 | | |
| |||
220 | 251 | | |
221 | 252 | | |
222 | 253 | | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
223 | 269 | | |
224 | 270 | | |
225 | 271 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 35 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
801 | 801 | | |
802 | 802 | | |
803 | 803 | | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
804 | 839 | | |
805 | 840 | | |
806 | 841 | | |
| |||
Lines changed: 35 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
704 | 704 | | |
705 | 705 | | |
706 | 706 | | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
707 | 742 | | |
708 | 743 | | |
709 | 744 | | |
| |||
0 commit comments