Commit d9f955e
committed
fix: don't print 'Tunnel ready' until proxy URL responds
verify_endpoints was written but never called, causing tunnel_ready to
fire as soon as Kubernetes conditions flipped — before Envoy Gateway
had finished propagating the xDS config and the tunnel was actually
serving traffic.
Fix:
- Call verify_endpoints after hostname resolution, before emitting
tunnel_ready / printing 'Tunnel ready:'
- Probe the origin first (best-effort, bounded budget) to confirm the
local service is up
- Then poll the tunnel HTTPS URL on a fixed 10s interval until it
returns a non-5xx response, printing a status line each attempt
- Only then emit tunnel_ready
Also simplifies verify_endpoints: removes the exponential-backoff inner
loop in favour of the fixed 10s interval the user sees.1 parent b9e4d79 commit d9f955e
2 files changed
Lines changed: 37 additions & 33 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
546 | 546 | | |
547 | 547 | | |
548 | 548 | | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
549 | 563 | | |
550 | 564 | | |
551 | 565 | | |
| |||
571 | 585 | | |
572 | 586 | | |
573 | 587 | | |
574 | | - | |
| 588 | + | |
575 | 589 | | |
576 | 590 | | |
577 | 591 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
| |||
283 | 283 | | |
284 | 284 | | |
285 | 285 | | |
286 | | - | |
| 286 | + | |
287 | 287 | | |
288 | | - | |
289 | | - | |
290 | 288 | | |
291 | 289 | | |
292 | 290 | | |
| |||
295 | 293 | | |
296 | 294 | | |
297 | 295 | | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
309 | 304 | | |
310 | 305 | | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
321 | 313 | | |
322 | 314 | | |
323 | | - | |
324 | | - | |
325 | | - | |
| 315 | + | |
326 | 316 | | |
327 | 317 | | |
328 | 318 | | |
| |||
0 commit comments