Commit 3b89217
fix: gRPC appProtocol and EVM WebSocket routing (#71)
* fix: gRPC appProtocol and EVM WebSocket routing
Two networking fixes from expert validation:
1. gRPC: set appProtocol "kubernetes.io/h2c" on the gRPC ServicePort
so Envoy uses HTTP/2 to the backend. Without this, Envoy defaults
to HTTP/1.1 and gRPC requests fail.
2. EVM WebSocket: add a second rule to the EVM HTTPRoute with a
header match for "Upgrade: websocket" routing to port 8546. seid
serves JSON-RPC on 8545 and WebSocket on 8546 as separate ports.
The first rule (default) routes HTTP to 8545, the second routes
WebSocket upgrades to 8546. Both share the same hostname, matching
the industry standard (Alchemy, Infura use one URL for HTTP + WS).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: set gRPC appProtocol on headless per-node Service
Set appProtocol "kubernetes.io/h2c" on the gRPC port in the headless
per-node Service (servicePorts), matching what's already set on the
shared external Service. Ensures Istio/Envoy uses HTTP/2 for gRPC
when routing directly to individual pods.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* test: add edge case coverage and remove breadcrumb comment
Add tests for:
- Empty domain produces malformed hostnames (documents the invariant
that platform.Validate() catches at startup)
- Validator mode produces zero routes
- Non-EVM routes have exactly one rule and zero WSPort
Remove breadcrumb comment in BackendRef test.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 5b28288 commit 3b89217
3 files changed
Lines changed: 161 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
343 | 343 | | |
344 | 344 | | |
345 | 345 | | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
346 | 350 | | |
347 | 351 | | |
348 | 352 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
198 | 199 | | |
199 | 200 | | |
200 | 201 | | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
201 | 206 | | |
202 | 207 | | |
203 | 208 | | |
| |||
242 | 247 | | |
243 | 248 | | |
244 | 249 | | |
245 | | - | |
| 250 | + | |
246 | 251 | | |
247 | 252 | | |
248 | 253 | | |
249 | | - | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
250 | 259 | | |
251 | 260 | | |
252 | 261 | | |
| |||
331 | 340 | | |
332 | 341 | | |
333 | 342 | | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
334 | 375 | | |
335 | 376 | | |
336 | 377 | | |
| |||
344 | 385 | | |
345 | 386 | | |
346 | 387 | | |
347 | | - | |
348 | | - | |
349 | | - | |
350 | | - | |
351 | | - | |
352 | | - | |
353 | | - | |
354 | | - | |
355 | | - | |
356 | | - | |
| 388 | + | |
357 | 389 | | |
358 | 390 | | |
359 | 391 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
61 | 79 | | |
62 | 80 | | |
63 | 81 | | |
| |||
202 | 220 | | |
203 | 221 | | |
204 | 222 | | |
| 223 | + | |
205 | 224 | | |
206 | 225 | | |
207 | 226 | | |
208 | 227 | | |
209 | | - | |
| 228 | + | |
210 | 229 | | |
211 | 230 | | |
212 | 231 | | |
| 232 | + | |
| 233 | + | |
213 | 234 | | |
214 | 235 | | |
215 | 236 | | |
216 | 237 | | |
217 | 238 | | |
218 | 239 | | |
219 | 240 | | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
220 | 277 | | |
221 | 278 | | |
222 | 279 | | |
| |||
264 | 321 | | |
265 | 322 | | |
266 | 323 | | |
267 | | - | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
268 | 332 | | |
269 | 333 | | |
270 | 334 | | |
| |||
319 | 383 | | |
320 | 384 | | |
321 | 385 | | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
322 | 433 | | |
323 | 434 | | |
324 | 435 | | |
| |||
0 commit comments