一键导入
gateway-api
Compatibility notes for Edgion's Gateway API handling, including intentional deviations and not-implemented features.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Compatibility notes for Edgion's Gateway API handling, including intentional deviations and not-implemented features.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Conventions shared by the in-repo binaries (edgion-controller, edgion-gateway, edgion-cli) — project overview, command line / directory / config-path conventions, Core layering conventions, resource system.
KubernetesCenter implementation — K8s Reflector watching, leader election, HA mode, ResourceController lifecycle, status writeback.
ConfigCenter subsystem — ConfCenter trait abstraction, FileSystemCenter and KubernetesCenter implementations, unified Workqueue + ResourceProcessor pipeline.
edgion-controller control plane architecture — overall design, startup/shutdown, Admin API, ConfigCenter, Workqueue, ResourceProcessor, Requeue, CacheServer, ACME service.
Route matching overview — multi-stage pipeline (Listener→Domain→Path→DeepMatch), per-listener isolation, registration flow, atomic swap.
TLS subsystem overview — TLS Store, SNI matching, certificate management, BoringSSL/OpenSSL backend selection.
| name | gateway-api |
| description | Compatibility notes for Edgion's Gateway API handling, including intentional deviations and not-implemented features. |
Use this note when changing Gateway API behavior in Edgion and you need to understand intentional compatibility boundaries.
| File | Content |
|---|---|
| 01-not-implemented.md | Gateway API features not implemented or postponed: addresses reporting, cross-type Hostname conflict detection, infrastructure, ListenerSet, HTTPRouteRequestMultipleMirrors, GatewayFrontendClientCertificateValidation (status OK, enforcement not conformant), BackendTrafficPolicy, TLSRouteModeMixed, TLS profile; completed items: SUPPORTED_FEATURES / UNSUPPORTED_OR_SKIPPED_FEATURES constants in edgion-resources/src/resources/gateway_class.rs (this file only records rationale). |
| 02-conformance-testing.md | How to run, debug, and incrementally validate Gateway API conformance tests: script usage, granularity control, port-forward, debugging tips |
| 03-conformance-workflow.md | Cross-session workflow: drive conformance tests one item at a time (environment check → feature analysis → run → diagnose → record) |
| 05-batch-conformance-debugging.md | Log collection, timeline correlation, and root-cause localization for batch conformance failures (Batch 7 specific) |
| 06-conformance-debug-cookbook.md | Conformance troubleshooting cookbook: pre-flight checks, common failure modes (namespace deleted, ports not bound, stale processes, etc.), efficient run tips |
ALL PASS (in-cluster mode, split-profile run)
| Profile | Declared | Result |
|---|---|---|
GATEWAY-HTTP | ✅ | Core 33/33, Extended 32/32 — FULL PASS |
GATEWAY-GRPC | ✅ | Core 13/13 — FULL PASS |
GATEWAY-TLS | ✅ | Core 18/18, Extended 3/3 — FULL PASS |
MESH-* | ❌ | Not applicable (Edgion is not a service mesh) |
HTTP/GRPC and TLS must be run separately (port 443 conflict; see cookbook 2.3.1):
# Step 1: HTTP + gRPC
./scripts/in-cluster-runner.sh --clean-slate \
--conformance-profiles "GATEWAY-HTTP,GATEWAY-GRPC" --timeout 30m
# Step 2: TLS only
./scripts/in-cluster-runner.sh --clean-slate \
--conformance-profiles "GATEWAY-TLS" --timeout 30m
Reports: edgion-tests/conformance/reports/
| Issue | Root cause | Fix |
|---|---|---|
| Controller periodically restarting (~27s) | tokio::time::timeout(25s) started timing from boot | tokio::select! — timing starts only after a signal |
| TLS cert x509 CA:FALSE | upstream conformance suite self-signed cert lacked IsCA:true | Verified that v1.5.1 tests don't trigger this path; no patch needed |
| Stale TLS-backend cert cache | Pod did not reload after Secret recreation | --clean-slate automatically rolls out the TLS backend |
Configuration location: edgion-tests/conformance/conformance_test.go (opts.ConformanceProfiles)
Edgion intentionally does not support cross-port TLS certificate fallback, but does support catch-all (no hostname) listener certificate selection as a per-listener fallback.
hostname serves as the catch-all fallback for its port — its certificate is used when no hostname-specific listener matches the SNI.fallback_sni remains an Edgion-specific override for clients that send no SNI at all.Gateway API allows a Listener without hostname, meaning the listener matches all hostnames
at the routing level. Edgion honors this by using the catch-all listener's certificate as a
per-listener fallback when no hostname-specific listener matches the SNI. The certificate may not
be valid for every SNI, but this matches Gateway API conformance expectations — the catch-all
listener is the correct fallback within its listener scope.
Gateway listeners are listener-scoped (keyed by ListenerKey = "{addr}/{protocol}"). Allowing a fallback that ignores the listener key breaks listener isolation and can select the wrong certificate when the same hostname is configured differently on multiple listeners.
Edgion treats (ListenerKey, sni) as the required lookup key for Gateway TLS.
For EdgionTls, controller-side listener resolution is required before the resource can enter the matcher.
ListenerKey), the TLS resource is admitted into the matcher.Per Gateway API spec, when a parentRef specifies neither port nor
sectionName, the resource MUST attach to all listeners of the referenced
Gateway. This applies to:
TLSRoute (port resolution in tls_route.rs)EdgionTls (port resolution in edgion_tls.rs)HTTPRoute / GRPCRoute (hostname resolution in hostname_resolution.rs)Bug history (2026-03): The original implementation only handled port set
or sectionName set, missing the both-absent fallback. This caused TLSRoute
and EdgionTls to silently get resolved_listeners = None (now Vec<ListenerKey>)
when parentRef had only name + namespace.
Test coverage: TLSRoute/BothAbsentParentRef and
EdgionTls/BothAbsentParentRef integration tests verify this behavior.
EdgionTls must register in gateway_route_index via its on_change() method.
Without this, when a Gateway is added or its listeners change, EdgionTls would
not be requeued to re-resolve its listener ports.
Bug history (2026-03): EdgionTls originally had no on_change() at all.
If EdgionTls was processed before its Gateway during init, resolved_listeners
would permanently be empty with no requeue mechanism. Fixed by adding
on_change() with update_gateway_route_index() and on_delete() with
remove_from_gateway_route_index().
Rule: Any handler that calls lookup_gateway() in parse() MUST register
in gateway_route_index via on_change() so that Gateway changes trigger
requeue. Currently this applies to: TLSRoute, EdgionTls, HTTPRoute, GRPCRoute,
TCPRoute, UDPRoute.
When editing TLS matching:
EdgionTls matching listener-scoped (keyed by ListenerKey)