gateway icon indicating copy to clipboard operation
gateway copied to clipboard

e2e: Add backend health check e2e case via active http

Open aoledk opened this issue 7 months ago • 4 comments

What this PR does / why we need it:

Check whether backend health check via active http works in e2e, inspired by https://github.com/projectcontour/contour/blob/main/test/e2e/httpproxy/http_health_checks_test.go.

EG use the default 50% from Envoy as cluster panic threshold. In case of health check fail, all endpoints in cluster become unhealthy and panic mode is activated, request is distributed to all unhealthy echo-basic endpoints and get response from echo-basic, with same behavior as case of health check pass.

To make those two cases distinguishable, in case of health check fail, Envoy should not distribute request to unhealthy endpoint, respond with 503 no healthy upstream directly. This requires cluster panic mode is disabled.

Since EG doesn't have knob to configure cluster panic threshold currently, I use EnvoyPatchPolicy to disable cluster panic mode in this PR.

Issues about panic threshold in contour: https://github.com/projectcontour/contour/issues/579. https://github.com/projectcontour/contour/issues/1846

Which issue(s) this PR fixes:

xref #2417

aoledk avatar Jun 26 '24 07:06 aoledk