fix(elbv2): admit new targets after one successful health check (#6507)

* fix(elbv2): admit new targets after one successful health check

Preserve recovery thresholds and verify initial admission against a real HTTP target.

Signed-off-by: Andre Kurait <AndreKurait@gmail.com>

* fix(elbv2): scope initial health admission to application targets

Preserve network and gateway target-group health thresholds.

Signed-off-by: Andre Kurait <AndreKurait@gmail.com>

* fix(elbv2): retain initial health checking reason

Preserve the intermediate reason for network and gateway targets below their success threshold.

Signed-off-by: Andre Kurait <AndreKurait@gmail.com>

---------

Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
This commit is contained in:
Andre Kurait authored and GitHub committed 2026-10-25 09:30:22 -04:00
1 parent 4244e64833
commit 985a2ea949
4 files changed
+158 -6

No files matched your search

@@ -160,7 +160,10 @@ public class ElbV2HealthChecker implements Resettable {
if (success) {
state.consecutiveFailures = 0;
state.consecutiveSuccesses++;
if (state.consecutiveSuccesses >= healthyThreshold) {
boolean initialApplicationTarget = "initial".equals(state.status)
&& ("HTTP".equals(tg.getProtocol()) || "HTTPS".equals(tg.getProtocol())
|| "lambda".equals(tg.getTargetType()));
if (initialApplicationTarget || state.consecutiveSuccesses >= healthyThreshold) {
state.status = "healthy";
state.reason = null;
state.description = null;